Community gopher hole - Community & Forums Related Discussions
Users browsing this thread: 6 Guest(s)
|
|||
It goes to ~/.forward (see forward(5) on the host). You have to modify the content of this file to set the email address you want to authorize publishing to your phlog, instead of "EMAIL@ADDRESS".
I think you need to understand how the SMTP daemon works on this system, so here is a breakdown, starting with the user's mail client. Let's say my own personal address is "spamtrap@z3bra.org" (don't email me to this address or you'll get blacklisted on my server. I hope some crawling spammers will). My .forward file will thus include the following: Code: "|/usr/local/bin/scribo -b ~/public_gopher/rlog -a spamtrap@z3bra.org" Here is what happens: 1. Create an email (note the "From:" field) Code: From: The stripped horse <spamtrap@z3bra.org> 2. Send the email Upon pressing "Send!", your email will be sent to your email provider (in my case, "z3bra.org"), and then be transferred to the running smtpd(8) daemon at "g.nixers"net" (our server). The daemon will receive it on its TCP socket, read the enveloppe, and accept it (because it's configured to accept all mails for @g.nixers.net"). 3. Deliver the email Now that the mail is accepted, it must be delivered. The rules are listed in "/etc/mail/gopherlog", you can even check, there's nothing fancy. The format is that of the aliases(5) file (you can check the man page on the system). This file lists the existing mailboxes, and what to do when an email arrives for that mailbox. In my case, I have this line: Code: z3bra@g.nixers.net z3bra Which means, deliver all mails to "z3bra@g.nixers.net" to the local user "z3bra" on this host. smtpd(8) will then lookup my home directory in the passwd(5) database, and search for a .forward file here. If it's not found, the mail will go to /var/mail/z3bra (my mailbox). In my case, the .forward file exists, and is not empty, so the server will process it, just like if its content was in the "/etc/mail/gopherlog", next to my email. 4. Pipe the email The aliases(5) manpage states the following: Code: |command Which means that the email I received will be passed to "/usr/local/bin/scribo", on stdin. Upon reading the email, scribo(1) will read all email headers, and check that the "From:" field includes the email address passed with the "-a" flag. In my case, if the From: field doesn't include "spamtrap@z3bra.org", the message will be bounce, and a mail from "MAILER-DAEMON" will arrive in my inbox, similar to the one evbo received. 5. Create log entry In my case, the email address is correct though, so the mail will be happily processed by scribo, which will use the subject to generate a filename, and write the email body in this file, inside the ~/public_gopher/rlog directory, and be immediately available over gopher ! Code: $ curl -s gopher://g.nixers.net/0/~z3bra/rlog/showingoffsmtpd8work.txt |
|||
Messages In This Thread |
Community gopher hole - by z3bra - 13-09-2020, 03:16 PM
RE: Community gopher hole - by opfez - 14-09-2020, 01:03 PM
RE: Community gopher hole - by z3bra - 14-09-2020, 03:37 PM
RE: Community gopher hole - by ekangmonyet - 14-09-2020, 11:47 PM
RE: Community gopher hole - by z3bra - 15-09-2020, 02:59 AM
RE: Community gopher hole - by ekangmonyet - 15-09-2020, 05:17 AM
RE: Community gopher hole - by opfez - 15-09-2020, 02:52 PM
RE: Community gopher hole - by z3bra - 15-09-2020, 03:50 PM
RE: Community gopher hole - by z3bra - 15-09-2020, 06:52 PM
RE: Community gopher hole - by z3bra - 18-09-2020, 11:16 AM
RE: Community gopher hole - by pfr - 19-09-2020, 06:22 AM
RE: Community gopher hole - by movq - 19-09-2020, 02:57 PM
RE: Community gopher hole - by pfr - 20-09-2020, 09:10 PM
RE: Community gopher hole - by z3bra - 21-09-2020, 05:22 AM
RE: Community gopher hole - by evbo - 21-09-2020, 11:22 AM
RE: Community gopher hole - by z3bra - 21-09-2020, 01:26 PM
RE: Community gopher hole - by evbo - 21-09-2020, 01:42 PM
RE: Community gopher hole - by z3bra - 21-09-2020, 03:36 PM
RE: Community gopher hole - by opfez - 22-09-2020, 04:23 AM
RE: Community gopher hole - by z3bra - 22-09-2020, 05:12 AM
RE: Community gopher hole - by pfr - 24-09-2020, 12:58 AM
RE: Community gopher hole - by venam - 24-09-2020, 04:01 AM
RE: Community gopher hole - by z3bra - 24-09-2020, 12:32 PM
RE: Community gopher hole - by pfr - 25-09-2020, 01:18 AM
RE: Community gopher hole - by z3bra - 25-09-2020, 06:30 AM
RE: Community gopher hole - by pfr - 25-09-2020, 10:47 AM
RE: Community gopher hole - by z3bra - 25-09-2020, 12:58 PM
RE: Community gopher hole - by pfr - 26-09-2020, 01:53 AM
RE: Community gopher hole - by mcol - 05-10-2020, 02:53 PM
RE: Community gopher hole - by z3bra - 05-10-2020, 02:56 PM
RE: Community gopher hole - by mcol - 05-10-2020, 05:47 PM
RE: Community gopher hole - by Dworin - 06-10-2020, 01:33 AM
RE: Community gopher hole - by z3bra - 06-10-2020, 06:21 AM
RE: Community gopher hole - by pfr - 06-10-2020, 09:03 AM
RE: Community gopher hole - by mcol - 06-10-2020, 01:25 PM
RE: Community gopher hole - by pfr - 02-11-2021, 11:09 PM
RE: Community gopher hole - by z3bra - 03-11-2021, 06:02 AM
RE: Community gopher hole - by jkl - 04-11-2021, 12:41 AM
RE: Community gopher hole - by z3bra - 04-11-2021, 06:22 AM
RE: Community gopher hole - by pfr - 18-11-2021, 08:58 PM
RE: Community gopher hole - by z3bra - 19-11-2021, 03:34 AM
RE: Community gopher hole - by pfr - 21-11-2021, 07:37 AM
RE: Community gopher hole - by ckester - 23-11-2021, 11:30 PM
RE: Community gopher hole - by ckester - 23-08-2022, 01:20 AM
RE: Community gopher hole - by ckester - 29-10-2022, 11:07 PM
RE: Community gopher hole - by z3bra - 03-11-2022, 07:02 AM
RE: Community gopher hole - by pyratebeard - 04-11-2022, 05:18 PM
|