From: Mark S Bilk on 28 Nov 2009 12:18 On Nov 28, 4:28 am, houghi <hou...(a)houghi.org.invalid> wrote: > I think I broke it. Now mail does not arrive anymore at all. Not even > internal mail. I deinstalled postfix and tried sendmail and then back to > postfix. Instead of the fiendishly complicated semdmail or postfix (or qmail) I use fetchmail to get the mail from my ISP's popmail server, and another little program called ssmtp to send mail to my ISP's smtp server. This way I have a mail system that I can understand, and it works fine. fetchmail can pull in mail from accounts on multiple servers (specified in the .fetchmailrc file) and can even run in "daemon mode", so it polls the servers periodically. But I just run it manually by typing "fm", which is aliased to "fetchmail". My ..fetchmailrc file was posted previously, and causes fetchmail to send the mail to procmail. Procmail weeds out various annoying senders and subjects, then whitelists the mail from all the lists I'm on, and sends the rest through spamassassin. Since you had procmail working before, you probably know how to make it send the messages it approves to your mail spool file, /var/spool/mail/houghi or whatever. I can post a skeleton of my .procmailrc file if you want. All that remains now is to send mail via ssmtp. I use mutt as my mailreader (client). When you compose a message in mutt (including attachments) and tell it to send, it invokes the program specified in its "sendmail" variable (in a line in the .muttrc file). Here is that line (username and password have been substituted here for the actual ones for my ISP account): set sendmail="/usr/local/sbin/ssmtp -oem -oi -v -auusername - appassword -amLOGIN" If your mail client does not have such an option, I guess you can put ssmtp (or a soft link to it) where sendmail is expected to be: /usr/lib/sendmail and/or /usr/sbin/sendmail In other words, ssmtp or a link to it would be named "sendmail" and placed in /usr/lib and/or /usr/sbin If you're using mutt, you also have to put the following line in the .muttrc file to prevent mutt from including the Bcc: line(s) in the sent mail. (It still sends the mail to the recipients in the Bcc line(s).) set write_bcc=no The remaining instructions for ssmtp reside in the ssmtp.conf file, located at: /usr/local/etc/ssmtp/ssmtp.conf Here is the content (and explanation) of ssmtp.conf as I use it. There are some additional options in the sample ssmtp.conf that comes with the ssmtp package. # The person who should get all the mail for userids < 1000. # If this is you, it should be your username, i.e., the # name of your home directory. I think this is for warning # messages sent to the root account by the OS, regarding disks # being full, etc. Since I have ssmtp being invoked only by # mutt, I never see those messages. Maybe I would if I made # /usr/lib/sendmail a link pointing to ssmtp. root=username # The place you want the mail sent to -- your ISP's mail host. # ":portnumber" can be omitted if it's the standard port 25 mailhub=mail.isp.net:portnumber # The full hostname # I'm not sure what this does. Mine is set to cosmicpenguin.com, # my website, which is not involved in the sending of mail. hostname=yourdomain.com # This causes the envelope address to be set to the address # in the From: line of the e-mail, which you definitely want! FromLineOverride=YES That's it. A simple and understandable mail system!
From: Mark S Bilk on 28 Nov 2009 12:29
On Nov 28, 9:18 am, Mark S Bilk <m...(a)cosmicpenguin.com> wrote: >... > set sendmail="/usr/local/sbin/ssmtp -oem -oi -v -auusername - > appassword -amLOGIN" Oops, that line got split wrong. The following two lines should be combined, with only a space character between them, into a single line: set sendmail="/usr/local/sbin/ssmtp -oem -oi -v -auusername -appassword -amLOGIN" |