0

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.

1 Answer 1

1

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.

4
  • 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, 2013 at 23:09
  • Yes. That is correct. No standards-compliant SMTP server will examine the headers to determine message recipients.
    – qqx
    Mar 6, 2013 at 23:15
  • Do you know how I can acheive this behaviour with PHP Swift Mailer?
    – Tobi
    Mar 7, 2013 at 2:38
  • No, I don't do PHP.
    – qqx
    Mar 7, 2013 at 2:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .