Skip to contentSkip to conversation

Help with sendmail

DISCUSSION MattyB 3 participants 3 messages Sep 23, 2007

lore
Share & tools
lore

MattyB

author
#0 lore raw

Hello,

I have setup sendmail on my RedHat ES V4 and I need to setup sendmail on this machine as an SMTP relay host only. It will not receive email, just send it from the localhost and another host that will send mail via a J2EE application.

I setup sendmail to accept relaying from other hosts, and I don't recieve any errors when sending mail from others hosts or the local host (using sendmail -v <email_address>), but all the emails I send are stuck in the que and they can't seem to get out. I tried sending emails to my personal yahoo.com and netzero.net email accounts, and I receive no error messages, but when I check the que using "mailq", I see the following (my real email address was replayced with (my address)):

l8NJtYPd010475 0 Sun Sep 23 14:55 <[email protected]>
(Deferred: Connection timed out with c.mx.mail.yahoo.com.)
<(my address)@yahoo.com>
l8NK2pNn010766 0 Sun Sep 23 15:02 <[email protected]>
(Deferred: Connection timed out with d.mx.mail.yahoo.com.)
<(my address)@yahoo.com>
l8NKGcw4011501* 48 Sun Sep 23 15:16 <[email protected]>
(Deferred: Connection timed out with mx.dca.untd.com.)
<(my address)@netzero.net>

DNS is setup properly because I can ping smtp.mail.yahoo.com as well as the MX addressed above.

Any ideas?

Thanks,

Matt

Signature · 2 lines
View this message in context: http://www.nabble.com/Help-with-sendmail-tf4505805.html#a12850343
Sent from the linux-admin mailing list archive at Nabble.com.
#1 lore raw
Quoted 10 lines · MattyB

I setup sendmail to accept relaying from other hosts, and I don't recieve any errors when sending mail from others hosts or the local host (using sendmail -v <email_address>), but all the emails I send are stuck in the que and they can't seem to get out. I tried sending emails to my personal yahoo.com and netzero.net email accounts, and I receive no error messages, but when I check the que using "mailq", I see the following (my real email address was replayced with (my address)):

l8NJtYPd010475 0 Sun Sep 23 14:55 <******[email protected]******>

							^^^^^^^^^^^^There's your problem.

--Adrian.

#2 lore raw
In reply to MattyB
Quoted 13 lines · MattyB

I have setup sendmail on my RedHat ES V4 and I need to setup sendmail on this machine as an SMTP relay host only. It will not receive email, just send it from the localhost and another host that will send mail via a J2EE application.

I setup sendmail to accept relaying from other hosts, and I don't recieve any errors when sending mail from others hosts or the local host (using sendmail -v <email_address>), but all the emails I send are stuck in the que and they can't seem to get out. I tried sending emails to my personal yahoo.com and netzero.net email accounts, and I receive no error messages, but when I check the que using "mailq", I see the following (my real email address was replayced with (my address)):

Quoted 1 line

l8NJtYPd010475 0 Sun Sep 23 14:55 <[email protected]>

As Adrian notes, localhost.localdomain isn't valid. You need to either configure your hostname and domain to something which is valid, or tell sendmail to masquerade as an appropriate domain, e.g.:

FEATURE(masquerade_envelope')dnl MASQUERADE_AS(my.domain.com')dnl MASQUERADE_DOMAIN(`localhost.localdomain')dnl

If you use the domain from your email address, ensure that all mails are sent using a valid username (i.e. don't use "root" unless you have an entire domain; do *not* send mail which has [email protected] as the sender).

When originating mail locally, you can use the -f option to set the envelope sender. Note that this will generate an X-Authentication-Warning header if the sender isn't trusted (in class T, normally read from /etc/mail/trusted-users).

Quoted 1 line

(Deferred: Connection timed out with c.mx.mail.yahoo.com.)

"Connection timed out" suggests a networking problem. Does e.g. "telnet c.mx.mail.yahoo.com. 25" work from the host running sendmail?

Note that many ISPs prohibit direct outbound SMTP connections, requiring that mail is sent through their mail servers.

If this is the case, you need to configure sendmail to forward outbound email to their server , e.g.:

define(SMART_HOST', mail.yourisp.net')

Signature · 1 line
Glynn Clements <[email protected]>