On 9/14/06, David Grant <[EMAIL PROTECTED]
> wrote:
I tried setting MAILTO=david and that didn't work. I decided ssmtp might be the problem, so I isolated it and tried this:
Hmm, it turns out that setting MAILTO=root in my own user's crontab makes it send mail. MAILTO=root is already in /etc/cron/crontab by the way so this is all very strange.
1. echo test |mail -s "testing ssmtp to external" [EMAIL PROTECTED]
2. echo test |mail -s "testing ssmtp mail to root" root
3. echo test |mail -s "testing ssmtp mail to david" david
4. echo test |mail -s "testing ssmtp mail to sarah" sarah
1. The first one worked. So ssmtp can send to external addresses fine.
2. The second one worked. So ssmtp can look at the "root=" command (which tells it where to send mail to user ids < 1000) properly and send to whatever root= is set to.
3. The third one didn't work. So for some reason I can't send mail to a normal user. But maybe something is weird with that user. I used to run a mail server on this machine with that user (postfix/procmail/blah/blah/blah) so maybe some leftover thing was screwing things up.
4. Sending mail to this user didn't work either. The users in 3. and 4. are both in /etc/ssmtp/revaliases. User 3 is in the 'mail' group (does that even matter) and I tried user 4. with and without that user in the revaliases file.
It looks like maybe ssmtp isn't seeing my revaliases file? Or maybe I'm not using is properly?
david:[EMAIL PROTECTED]:smtp.vc.shawcable.net
sarah:[EMAIL PROTECTED] :smtp.vc.shawcable.net
--
David Grant
http://www.davidgrant.ca