In my system, the .fetchmailrc and .procmailrc files are in
my home account directory, and fetchmail calls procmail. Here
is .fetchmailrc. The second line is indented with two space
characters:
poll mail.server.name proto pop3
user "username" pass "password" fetchall limit 0 mda "procmail -f -"
mail.server.name, username, and password are substituted here
for the actual ones for my ISP, but the punctuation is as shown.
I run fetchmail as a user. fetchmail and procmail are both in
/usr/bin, which is on my personal PATH.
> You can have peace. Or you can have freedom.
> Don't ever count on having both at once.
> -- Robert A. Heinlein
Thanks for that!
Two videos of a great song:
http://www.youtube.com/watch?v=w8KQmps-Sog&channel=muse
http://www.youtube.com/watch?v=Vf8bKkXU_2s&feature=related
> When I retrieve my mail with fetchmail or when I use `mail houghi` it
> looks as if the .procmailrc file is not being used.
>
> Is there anything I must do to so it will be working again?
You haven't corrupted ~/.forward have you? I couldn't get procmail
working without having .forward containing:
"|IFS=' ' && exec /usr/bin/procmail -f- || exit 75 #davjam"
Regards,
David Bolt
--
Team Acorn: www.distributed.net OGR-NG @ ~100Mnodes RC5-72 @ ~1Mkeys/s
openSUSE 10.3 32b | openSUSE 11.0 32b | | openSUSE 11.2 32b
openSUSE 10.3 64b | openSUSE 11.0 64b | openSUSE 11.1 64b |
RISC OS 4.02 | RISC OS 3.11 | openSUSE 11.1 PPC | TOS 4.02
So that's a totally different way of invoking procmail.
I must be backward -- I don't even have a .forward .
>Is there anything I must do to so it will be working again?
Yes. Please discuss this somewhere where the developers
of procmail can see it. They don't usually read this newsgroup.
Or perhaps you could file a bug report.
--
--- Paul J. Gans
> Mark S Bilk wrote:
>> So that's a totally different way of invoking procmail.
>> I must be backward -- I don't even have a .forward .
I don't know why it didn't work for me without the .forward but, after
adding it, it's been working just fine and I'm loath to break things
just to see if I can get it working without it.
> 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.
I've used Sendmail for years, starting with SuSE 6.1, and have no
knowledge about Postfix so can't help there. It's one of the thinks I
change when starting an installation, and I need to check the repair
system for 11.2 as the one for 11.1 explicitly wants to add Postfix
when doing an automatic repair rather than checking for the presence of
a mail server. Going to be adding a bug report for that if the issue is
still present.
> I also removed procmail to get stuff done seriously.
> Also to make it easier, I deleted the /var/log/mail* files.
Pity. They may have contained a possible pointer to what was broken.
> Now I can start postfix, but nothing else happens. Unable to send any
> internal mail, no logfiles created. Nothing.
Nothing at all? What happens if you telnet to your server? Do you see
the mailserver's banner? My first debugging tests are to telnet to the
server, firstly to check it's actually accepting connections, and then
to use the following:
ehlo localhost
mail from: <$USERNAME@$DOMAIN_NAME>
rcpt to: <$USERNAME@$DOMAIN_NAME>
data
From: <$USERNAME@$DOMAIN_NAME>
To: me <$USERNAME@$DOMAIN_NAME>
Subject: test
this will be the test mail body.
.
quit
I copy and paste it one line at a time, and have a console open with:
sudo tail -F /var/log/mail
running in it. The combination of seeing the log file and looking at
the responses to the various commands lets me see what's happening
and can help debugging.
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!
Oops, that line got split wrong. The following two lines should
be combined, with only a space character between them, into a
single line: