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.

What I have is:

  1. Windows server generating emails with own app and sending them to relay server (2) - this works fine

  2. Relay server that sends emails received from (1) - CentOS - working fine

What I need is to additionally configure CentOS postfix to send bounce messages to Windows server (to work on them using own app on specified port). I tried to add in /etc/postfix/transport line:

test.pl        bounced:[12.34.56.78]:29990

and run

postmap /etc/postfix/transport

but I have no idea what I should do more to make it work.

In maillog I have:

Mar  6 12:00:22 ubuntu postfix/qmgr[1633]: 9CBB260899: from=<root@ubuntu>, size=197, nrcpt=1 (queue active)
Mar  6 12:00:22 ubuntu postfix/qmgr[1633]: warning: connect to transport private/bounced: No such file or directory
Mar  6 12:00:22 ubuntu postfix/error[1744]: 9CBB260899: to=<a@test.pl>, relay=none, delay=1890, delays=1890/0/0/0.01, dsn=4.3.0, status=deferred (mail transport unavailable)
share|improve this question
    
Do you have transport_maps = hash:/etc/postfix/transport in your main.conf? Have you restarted or reloaded postfix since making these changes? –  Ladadadada Mar 6 '13 at 10:31
    
Yes, I have this line in main.cf. Yes, I've runned postfix reload. –  pbies Mar 6 '13 at 10:59

2 Answers 2

In transport, you normally only have 4 options. Local, Virtual, Relay or Default. If you're going to create another, you'll need to define what it does in the master.cf file. That's why you are getting file not found errors. You've told it to send it to bounced, but not created bounced.

You should probably have a look at this to start you off in the right direction.

share|improve this answer
    
That helped me a little, but didn't give the resolution. I'll put the answer myself. –  pbies Mar 6 '13 at 21:39
up vote 0 down vote accepted

What have I done to make it work:

  1. written a python script to send standard input through TCP to bounce server (fixed IP and port)
  2. added a line to postfix master.cf file, to send bounce emails to python script:

    bounced unix - n n - - pipe user=bounce argv=/etc/postfix/mailpipe.py

  3. added a line to /etc/services and corresponding postfix services file:

    bounced 23232/tcp # bounce

  4. made transport file for postfix:

    domain.com bounced:[12.34.56.78]:23232

  5. "compiled" postmap transport file:

    postmap /etc/postfix/transport

  6. made user bounce and added it to group postfix

  7. restarted by:

    postfix reload

share|improve this answer

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.