Re: Unix program that sends email directly using MX record

Nick Frost <[email protected]> Mon, 24 Nov 2008 11:13:10 -0700
Newsgroups gmane.org.user-groups.nmlug
Message-ID <[email protected]>
Kelly Jones wrote:
> What Unix program sends email directly, using the MX record of the
> recipient, instead of using sendmail or an installed MTA?
>
> I realize I could tweak sendmail.cf/etc to do this, but that's not
> working in my (fairly unusual) special situation.
>
> I also realize that sending email directly is normally "bad", but I'm
> testing something.
>   
I'm not sure I understand your question, in that in my understanding 
recipient don't have MX records, *domains* do.

If you send email using postfix or Sendmail, unless it's configured as a 
smarthost, nullclient or something like that, the MX record of the email 
addressee/recipient's domain is looked up and the mail is delivered to 
that mail exchanger.

There are some drop-in replacements for MTA's (Postfix/Sendmail) that 
just send email, e.g. SSMTP http://linux.die.net/man/8/ssmtp

Or, you can configure Sendmail or Postfix to relay mail to a specific 
host via MAILERTABLE type functionality (Sendmail) or what is called 
"transport_table" in Postfix; or by using the "relayhost" variable in 
main.cf (Postfix).

But, I'm not sure that answers your question since I don't know what you 
mean by "MX record of the recipient"?..unless you mean "MX record of the 
recipient's domain" and in that case that's what Sendmail and Postfix do 
when they receive mail via SMTP and then deliver it to the foreign MTA 
(which they do by an MX lookup on the recipients domain/destination).

You can also write a PERL script to deliver mail via SMTP.

-Nick






-- 
----------------------------------------
Nicholas S. Frost
7 Avenida Vista Grande #325
Santa Fe, NM  87508
[email protected]
----------------------------------------


_______________________________________________
NMLUG mailing list
[email protected]
http://lists.b9.com/cgi-bin/mailman/listinfo/nmlug