Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Background: We would like to split transactional and promotional email. for promotional bulk messages, 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? ( or sendmail instance listens on localhost and sendmail instance listens on

Is it as simple as SSHing to the machine on the 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.

share|improve this question
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


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.