Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Background: We would like to split transactional and promotional email. email.mydomain.com for promotional bulk messages, mail.mydomain.com for transactional and internal messages.

So far we have the DNS and local addresses set up and I think I understand most of how this works except for one thing. If a message is sent via the command line with

sendmail -t

How can I specify which sendmail instance to send with? (email.mydomain.com or mail.mydomain.com)

mail.mydomain.com sendmail instance listens on localhost and 192.168.1.15
email.mydomain.com sendmail instance listens on 192.168.1.25

Is it as simple as SSHing to the machine on the 192.168.1.25 interface and sending mail from there?

There doesn't seem to be a command line switch for sendmail. Am I missing something in my config or overlooking an important aspect of this somewhere?

I followed this for setting up another sendmail instance.

http://www.brandonhutchinson.com/Running_a_second_sendmail_instance.html

share|improve this question

2 Answers 2

up vote 0 down vote accepted

will you be using command-line sendmail for generating your messages, or some other mechanism? i ask because it's not clear whether you're using sendmail -t purely for testing purposes or as the intended application for this.

if you're sending any appreciable volume of mail, you'd want to split out generation of the respective types of email to their own application servers. in that case, you'd merely 'smart host' the respective server's output to the desired MTA IP.

share|improve this answer
    
We don't have the option of purchasing application servers specifically for this. Currently mail is sent with sendmail -t I'm not sure what constitutes an appreciable volume of mail, but our machine does just fine with what we ask of it. –  Chris E. Jul 20 '11 at 12:55
    
okay. i'm not really clear why you're splitting out the mail into two sendmail instances in that case. normally there are three reasons i can think of for splitting out the different types of email: performance, reliability, or to prevent spam filters/blacklists from affecting one or the other. since you're running the sendmails on the same server, it seems it's not for performance or reliability. if it's for blacklisting prevention, then you can accomplish it by having the subdomains configured in dns, then setting the 'from' and 'reply to' fields appropriately in your generated messages. –  anastrophe Jul 20 '11 at 22:15

Default /usr/sbin/sendmail will use default configuration file regardless which IP you use to SSH into machine. To send through another sendmail instance you need to specify its configuration file on command line with -C parameter.

share|improve this answer
    
I think this is what I was looking for, I haven't tested yet but this makes sense. –  Chris E. Jul 20 '11 at 12:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.