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.

Is there a way to force Postfix to handle mail as new mail (Inmail) instead of Sent mail (Outmail) if a specific header is set?

Because inmail is passed through the rules of routing (for example forwardings) and is just delivered to that address it was received for. Outmail will be deliverd to all addresses in To, CC and BCC.

I want all those (To, Cc) headers be there but I want the mail only sent to a specific address.

I get the mail to a address, parse it in php and want it to be delivered to a users address depending of information inside the mail. But of course the mail already was sent to all other receipients from the sending server.

Usages for that:

  • Mailing Lists
  • Support Systems
  • etc.
share|improve this question

1 Answer 1

up vote 1 down vote accepted

Postfix has no such distinction between types of mail. All messages go through the same routing process for all envelope recipient addresses.

The To, CC, and BCC headers have nothing to do with this. The only time postfix does anything with those is when a message is submitted to the sendmail program and the -t option was specified. In that case those headers will be examined to get the list of recipients for the original envelope.

In any case other than that described in the previous paragraph the list of recipients is always specified separately from any headers, either using the RCPT TO SMTP command or as non-option arguments to the sendmail program.

share|improve this answer
    
Ah, ok. So it is possible to send a mail using a SMTP-Connection of MY server using RCPT TO to other servers and it does not even read To and Cc - did I understood it Correctly? –  Tobi Mar 6 '13 at 23:09
    
Yes. That is correct. No standards-compliant SMTP server will examine the headers to determine message recipients. –  qqx Mar 6 '13 at 23:15
    
Do you know how I can acheive this behaviour with PHP Swift Mailer? –  Tobi Mar 7 '13 at 2:38
    
No, I don't do PHP. –  qqx Mar 7 '13 at 2:40

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.