sSMTP Configuration
Posted: May 13th, 2017, 10:23 am
I realise that this is not necessarily the best forum to ask this question but since what little I know of the inner workings of things Linux all stems from the marvelous little tutorials to be found at havetheknowhow it always feels like home, a warm and friendly place.
I am having a little local difficulty with sSMTP. I originally set it up from one of those tutorials which was in line with all the others I have seen but recently I have had two problems.
Firstly my samba server suffered a panic attack and started sending out emails, as you can see from the log entry...........
May 7 09:27:15 the-box sSMTP[19627]: Sent mail for root@usa.net (221 Goodbye) uid=0 username=root outbytes=763
My email provider usa.net were not best pleased to see me hijacking their "root" user. Sorted the samba problem then had a look at the sSMPT settings and made changes.....................
Possibly over kill and I am not sure what the side effects will be.
The next problem was in the apache2/php/cron area, I am playing around with some local sites Wordpress, Magento and others anyway....
May 9 17:22:05 the-box sSMTP[18062]: Sent mail for root@usa.net (221 Goodbye) uid=1000 username=j-dow outbytes=811
BAE Systems who now own usa@net declared a national emergency and shut down my email account {and the National Heath Service} these were actually addressed to j-dow@usa.net a non existent account.
I made some changes to both php.ini files......
I also added a parameter to cron
I may or may not have got this sorted but I am uncertain about the settings in the ssmtp.conf file I do not want to block alerts altogether as it is only there for that purpose and not for personal email.
The other thing that occurs to me is that it would make sense for sSMTP set up instructions to contain additional instructions for php and cron. I am still puzzling over the best way to deal with samba, it may require an edit in the "panic" file as this is where the "root" user is invoked, changing it to <myemailname> would probably do it.
Anyway I was just hoping to kick it around while I decide where to look for something better than my best guess.
I am having a little local difficulty with sSMTP. I originally set it up from one of those tutorials which was in line with all the others I have seen but recently I have had two problems.
Firstly my samba server suffered a panic attack and started sending out emails, as you can see from the log entry...........
May 7 09:27:15 the-box sSMTP[19627]: Sent mail for root@usa.net (221 Goodbye) uid=0 username=root outbytes=763
My email provider usa.net were not best pleased to see me hijacking their "root" user. Sorted the samba problem then had a look at the sSMPT settings and made changes.....................
Code: Select all
#rewriteDomain=usa.net - Commented out
#hostname=pauldmallett@usa.net - Changed
hostname=the-box
#FromLineOverride=YES - Changed
FromLineOverride=NO
The next problem was in the apache2/php/cron area, I am playing around with some local sites Wordpress, Magento and others anyway....
May 9 17:22:05 the-box sSMTP[18062]: Sent mail for root@usa.net (221 Goodbye) uid=1000 username=j-dow outbytes=811
BAE Systems who now own usa@net declared a national emergency and shut down my email account {and the National Heath Service} these were actually addressed to j-dow@usa.net a non existent account.
I made some changes to both php.ini files......
Code: Select all
[mail function]
;SMTP = localhost
;smtp_port = 25
sendmail_path = /usr/sbin/ssmtp -t -i
mail.force_extra_parameters = -f <myemailname>@usa.net
Code: Select all
MAILTO=pauldmallett@usa.net
The other thing that occurs to me is that it would make sense for sSMTP set up instructions to contain additional instructions for php and cron. I am still puzzling over the best way to deal with samba, it may require an edit in the "panic" file as this is where the "root" user is invoked, changing it to <myemailname> would probably do it.
Anyway I was just hoping to kick it around while I decide where to look for something better than my best guess.