Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Help with sendmail
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
a_l_a_n
n00b
n00b


Joined: 16 Dec 2006
Posts: 49

PostPosted: Tue Jun 05, 2007 11:23 am    Post subject: Help with sendmail Reply with quote

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
View user's profile Send private message
ce110ut
Apprentice
Apprentice


Joined: 27 Sep 2002
Posts: 200

PostPosted: Tue Jun 05, 2007 11:54 am    Post subject: Reply with quote

You can use any mail daemon that speaks smtp to send mail via any programming language.

Anyway, sendmail is highly customizable and completely depends on how you want to set it up. Here are a few links I found useful by searching on google "configure sendmail":

http://www.linuxjournal.com/article/5507
http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch21_:_Configuring_Linux_Mail_Servers
http://www.redhat.com/docs/manuals/linux/RHL-7.2-Manual/ref-guide/s1-email-sendmail.html
http://www.wikihow.com/Configure-Sendmail
Back to top
View user's profile Send private message
elgato319
Guru
Guru


Joined: 15 Sep 2005
Posts: 546

PostPosted: Tue Jun 05, 2007 12:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
a_l_a_n
n00b
n00b


Joined: 16 Dec 2006
Posts: 49

PostPosted: Tue Jun 05, 2007 1:06 pm    Post subject: Reply with quote

elgato319 wrote:
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.


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
View user's profile Send private message
a_l_a_n
n00b
n00b


Joined: 16 Dec 2006
Posts: 49

PostPosted: Tue Jun 05, 2007 1:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
elgato319
Guru
Guru


Joined: 15 Sep 2005
Posts: 546

PostPosted: Tue Jun 05, 2007 1:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
a_l_a_n
n00b
n00b


Joined: 16 Dec 2006
Posts: 49

PostPosted: Tue Jun 05, 2007 1:51 pm    Post subject: Reply with quote

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
View user's profile Send private message
elgato319
Guru
Guru


Joined: 15 Sep 2005
Posts: 546

PostPosted: Tue Jun 05, 2007 2:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
a_l_a_n
n00b
n00b


Joined: 16 Dec 2006
Posts: 49

PostPosted: Tue Jun 05, 2007 2:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum