View previous topic :: View next topic |
Author |
Message |
a_l_a_n n00b
Joined: 16 Dec 2006 Posts: 49
|
Posted: Tue Jun 05, 2007 11:23 am Post subject: Help with sendmail |
|
|
Could someone please help me configure my machine to send email. To be precise I want to use the mail function in PHP, which I believe means I must install sendmail. Im not bothered about receiving mail, just sending.
I emerged it but it doesnt work out of the box - I didnt expect it to. I tried editing /etc/mail/sendmail.mc and running it through m4, but I have no idea what Im doing.
The mail server I was going to use is mail2.eircom.net (my ISPs mailer), but Ill use anything that works. My setup is a home broadband connection, relevant I think because it means my box doesnt have a fixed IP.
Does anyone know how to get this to work. |
|
Back to top |
|
|
ce110ut Apprentice
Joined: 27 Sep 2002 Posts: 200
|
|
Back to top |
|
|
elgato319 Guru
Joined: 15 Sep 2005 Posts: 546
|
Posted: Tue Jun 05, 2007 12:33 pm Post subject: |
|
|
I think sendmail is a bit overkill. Try mail-mta/ssmtp.
Quote: | Description: Extremely simple MTA to get mail off the system to a Mailhub |
check my post at https://forums.gentoo.org/viewtopic-t-563603-highlight-.html for some ssmtp tutorials so you can use your isp mailer. |
|
Back to top |
|
|
a_l_a_n n00b
Joined: 16 Dec 2006 Posts: 49
|
Posted: Tue Jun 05, 2007 1:06 pm Post subject: |
|
|
Hazaah! I was struggling with ssmtp as you posted. One of the links you gave got me going with a gmail account. Still having trouble getting my preferred server working but its a start.
Thanks! |
|
Back to top |
|
|
a_l_a_n n00b
Joined: 16 Dec 2006 Posts: 49
|
Posted: Tue Jun 05, 2007 1:22 pm Post subject: |
|
|
Okay, Ill throw this out in case anyone has a clue.
Code: | send-mail: Server didn't accept AUTH LOGIN (502 unimplemented (#5.5.1))
Can't send mail: sendmail process failed with error code 1 |
The configuration is:
Code: |
root=me@eircom.net
mailhub=mail2.eircom.net
rewriteDomain=
hostname=me@eircom.net
AuthUser=me
AuthPass=mypassword
FromLineOverride=YES # optional |
This server doesnt require TLS or SSL and listens on port 25.
Ive seen the error reported, but cant find the solution. |
|
Back to top |
|
|
elgato319 Guru
Joined: 15 Sep 2005 Posts: 546
|
Posted: Tue Jun 05, 2007 1:42 pm Post subject: |
|
|
AUTH LOGIN is one way to authenticate to an smtp server. It's not pretty safe because user/pass is only base64 encoded.
Looks like this smtp doesn't do this anymore.
Alternatively ssmtp should be able to use auth cram-md5. i hope it does
checked the docs right now...
edit: i think i found it. could you add
Code: | AuthMethod=cram-md5 |
to /etc/ssmtp/ssmtp.conf
edit2:
ok..
mail2.eircom.net doesn't support any authentification at all.
Code: |
telnet mail2.eircom.net 25
220 mail14.svc.cra.dublin.eircom.net ESMTP
ehlo bla.de
250-mail14.svc.cra.dublin.eircom.net
250-PIPELINING
250-8BITMIME
250-ETRN
250 XEXDATA
auth login
502 unimplemented (#5.5.1)
auth cram-md5
502 unimplemented (#5.5.1)
auth plain
502 unimplemented (#5.5.1)
auth
502 unimplemented (#5.5.1)
help
214 qmail home page: http://pobox.com/~djb/qmail.html
auth ntls
502 unimplemented (#5.5.1)
exit
502 unimplemented (#5.5.1)
quit
|
|
|
Back to top |
|
|
a_l_a_n n00b
Joined: 16 Dec 2006 Posts: 49
|
Posted: Tue Jun 05, 2007 1:51 pm Post subject: |
|
|
elgato319 wrote: | AUTH LOGIN is one way to authenticate to an smtp server. It's not pretty safe because user/pass is only base64 encoded.
Looks like the google smtp doesn't this anymore.
Alternatively ssmtp should be able to use auth cram-md5. i hope it does
checked the docs right now...
edit: i think i found it. could you add
Code: | AuthMethod=cram-md5 |
to /etc/ssmtp/ssmtp.conf |
Afraid not ...
Code: | send-mail: Server rejected AUTH CRAM-MD5 (502 unimplemented (#5.5.1))
Can't send mail: sendmail process failed with error code 1 |
Thanks for this!
I added md5 useflag. When I dont use an AuthMethod it now responds
Code: | Can't send mail: sendmail process failed |
|
|
Back to top |
|
|
elgato319 Guru
Joined: 15 Sep 2005 Posts: 546
|
Posted: Tue Jun 05, 2007 2:28 pm Post subject: |
|
|
Are you sure you are supposed to be able to send emails via this mailserver?
To me i looks like it's not configured to be able to authenticate a user and act as an relay-server |
|
Back to top |
|
|
a_l_a_n n00b
Joined: 16 Dec 2006 Posts: 49
|
Posted: Tue Jun 05, 2007 2:53 pm Post subject: |
|
|
Yeah, it works in Thunderbird ... mail2.eircom.net, port 25, my username and password, no securing of the connection.
The only other thing I can add is that the server that is listed on the ISP support pages is actually mail1.eircom.net, but Ive always used mail2 and besides, using mail1 in ssmtp.conf changes nothing.
Not to worry. I was only trying it because using gmail mail is very very slow, but this is only for developing/testing a website so its not critical.
Thanks for your time. |
|
Back to top |
|
|
|