View previous topic :: View next topic |
Author |
Message |
Mitzi n00b
Joined: 16 Dec 2003 Posts: 45 Location: Cheshire, UK
|
Posted: Sat Jan 17, 2004 7:58 pm Post subject: Sendmail Relay Problem - set username/password? [SOLVED] |
|
|
Hi,
I currently have Apache running a formmail script which via sendmail sends emails. My problem is that I first need to issue
Code: | sendmail email@address.com -au[i]smtpusername[/i] -ap[i]smtppassword[/i] | or I get a message stating I must authenticate with my ISP SMTP server.
Can I add something to ssmtp.conf file to set the authentication details?
Cheers!
Last edited by Mitzi on Sat Jan 17, 2004 11:38 pm; edited 1 time in total |
|
Back to top |
|
|
Mitzi n00b
Joined: 16 Dec 2003 Posts: 45 Location: Cheshire, UK
|
Posted: Sat Jan 17, 2004 11:37 pm Post subject: |
|
|
Well I think I've sussed it...
Creating a new file called access in /etc/mail containing the following information:
AuthInfo:smtp.isp.com "U:username" "P:password" "M:LOGIN PLAIN"
Seems to allow me to send mail via my ISPs SMTP server without manually having to pass the username and password on the command line first. |
|
Back to top |
|
|
nordic bro Guru
Joined: 25 Oct 2003 Posts: 585
|
Posted: Wed Feb 04, 2004 3:38 am Post subject: |
|
|
I don't know where that came from but it worked for me. Only problem is that it seems I can only have one of those "AuthInfo" lines at a time. Anyone know how to use multiple "I:" entries (so that I can send mail from mulitple accounts, all on the same ISP)?
Mike |
|
Back to top |
|
|
reeder n00b
Joined: 02 Apr 2003 Posts: 45 Location: Plano, TX
|
Posted: Tue Nov 23, 2004 5:47 pm Post subject: |
|
|
nordic bro wrote: | I don't know where that came from but it worked for me. Only problem is that it seems I can only have one of those "AuthInfo" lines at a time. Anyone know how to use multiple "I:" entries (so that I can send mail from mulitple accounts, all on the same ISP)?
Mike |
This doesn't work for me. I had only ssmtp-2.60.9 installed. I searched the source (for ssmtp) and it never reads /etc/mail/access. I tried anyway, following the example above and it didn't work.
Then I tried /etc/mailer.conf, which was recommended in another thread, but that didn't work either (the file didn't exist before I created it). I then emerged mailwrapper and discovered that it used /etc/mail/mailer.conf instead of /etc/mailer.conf. Editing that (it did exist with mailwrapper installed) and adding "-au USER -ap PASSWD" to the ssmtp lines did the trick.
So, in summary, if you use ssmtp and need to authenticate to your mail relay (i.e. your ISP) then you need to make sure you have mailwrapper installed as well and at the -au and -ap parameters to the ssmtp invocation listed in /etc/mail/mailer.conf.
-- William |
|
Back to top |
|
|
|