I'd like to start using mutt, with sendmail and fetchmail. I've already configured and tested fetchmail. Besides, I connect to Internet using pppd, so my connection isn't permanent.
I thought it would be enough to start sendmail at boot time, so I did it, rebooted, wrote a message and then got connected to Internet. My message didn't got sent.
After that I shut down pppd and sendmail, modified the sendmail startup script and reduced the queue time (changed the -q param to -q2m), and tried again, starting sendmail first (as if it was done at boot time), and then connecting to internet, and waiting (to cover all doubts) 5 min. Nothing yet.
After googling a bit, I found that I should issue a "sendmail -q" when the ppp link goes up, so I putted that command in /etc/ppp/ip-up, added to ip-up exec permission and tried again. And nothing. In the mail log appears something like
Jul 15 13:24:15 abu sendmail: gethostbyaddr(22.214.171.124) failed: 2
sendmail (and besides, fetchmail) only works properly when I start it after getting connected (so I'm restarting sendmail in ip-up), but that is an unnecessary hack.
I've found the "sendmail -q" advice in several places, and I think the relevant question there is: how should I start sendmail at boot time to make it work properly?