LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Postfix confirmation mail to sender based on delivery status code (https://www.linuxquestions.org/questions/linux-server-73/postfix-confirmation-mail-to-sender-based-on-delivery-status-code-4175512822/)

dmikam 07-31-2014 04:20 AM

Postfix confirmation mail to sender based on delivery status code
 
Hi,
I have a postfix running on my server, but I need to make it to send confirmation mail to the sender (local sender). I mean, if the mail was delivered and not rejected, the sender needs to receive a confirmation like "Your message was delivered".

I suppouse it could be made with some rule in master.cf triggering some external script, passing to it delivery status code, and both directions (of the sender and the recipient).

Some suggestion, please ?
If there is some other solution - it is welcome also.
Thanks

TB0ne 07-31-2014 01:56 PM

Quote:

Originally Posted by dmikam (Post 5212417)
Hi,
I have a postfix running on my server, but I need to make it to send confirmation mail to the sender (local sender). I mean, if the mail was delivered and not rejected, the sender needs to receive a confirmation like "Your message was delivered".

I suppouse it could be made with some rule in master.cf triggering some external script, passing to it delivery status code, and both directions (of the sender and the recipient).

I think what you're looking for can be obtained by following this as a guide:
http://www.howtoforge.com/configure-...ounce-messages

It is also pointless. The email may be ACCEPTED by the remote server, but thrown out by a spam filter (either server-wide or client specific). They could also have an email rule to automatically delete any messages coming from your domain. Anything you do won't be effective at all in this instance. Same goes for read-receipts...unless the RECEIVER allows them, you have no idea if they got your message or not.

dmikam 08-01-2014 03:21 AM

Quote:

Originally Posted by TB0ne (Post 5212657)
I think what you're looking for can be obtained by following this as a guide:
http://www.howtoforge.com/configure-...ounce-messages

It is also pointless. The email may be ACCEPTED by the remote server, but thrown out by a spam filter (either server-wide or client specific). They could also have an email rule to automatically delete any messages coming from your domain. Anything you do won't be effective at all in this instance. Same goes for read-receipts...unless the RECEIVER allows them, you have no idea if they got your message or not.

First of all, thanks for replying ! But I think I already have tryed this manual - look's like it bounces these messages only to the postmaster and not to the sender... But I'll give it another try.

And, Yes, I understand that this type of confirmation doesn't confirm almost enything, but you know how are the bosses like - they just want to receive an "OK-mail" and that's it :P

So, resuming - I'll give it another try to the integrated bounce funcionality, but if somebody has other thoughts - you are welcome !

dmikam 08-01-2014 09:04 AM

Quote:

Originally Posted by TB0ne (Post 5212657)
I think what you're looking for can be obtained by following this as a guide:
http://www.howtoforge.com/configure-...ounce-messages

It is also pointless. The email may be ACCEPTED by the remote server, but thrown out by a spam filter (either server-wide or client specific). They could also have an email rule to automatically delete any messages coming from your domain. Anything you do won't be effective at all in this instance. Same goes for read-receipts...unless the RECEIVER allows them, you have no idea if they got your message or not.

No, for some reason, the integrated bounce funcionality doesn't work in my Ubuntu Server machine. It just never bounces on success.

Some other suggestions ?

dmikam 08-04-2014 02:34 AM

Some other suggestions, please ?
Still need it.

TB0ne 08-04-2014 09:06 AM

Quote:

Originally Posted by dmikam (Post 5214493)
Some other suggestions, please ?
Still need it.

Please don't post 'bumps' to your own thread, unless you have new information to add. You may still need it, but unless there's additional information to add, there's not much point to asking again. All you said previously was:
Quote:

Originally Posted by dmikam
No, for some reason, the integrated bounce funcionality doesn't work in my Ubuntu Server machine. It just never bounces on success

..yet you don't tell us what version of Ubuntu server, if you're running the right version of Postfix to support custom bouncing (as noted in that link), or what you've seen in the logs. Just saying "for some reason", gives us nothing to go on.

The link you were sent previously tells you how to modify the bounce behavior of messages. The first response also told you that it was pointless, since unless you control the RECEIVING SYSTEM ALSO, things may not bounce AT ALL.

dmikam 08-04-2014 01:16 PM

Quote:

Originally Posted by TB0ne (Post 5214699)
Please don't post 'bumps' to your own thread, unless you have new information to add. You may still need it, but unless there's additional information to add, there's not much point to asking again.

Ok, my bad. I'm sorry. Thanks for pointing to my errors.

Quote:

Originally Posted by TB0ne (Post 5214699)
..yet you don't tell us what version of Ubuntu server, if you're running the right version of Postfix to support custom bouncing (as noted in that link), or what you've seen in the logs. Just saying "for some reason", gives us nothing to go on.

The link you were sent previously tells you how to modify the bounce behavior of messages. The first response also told you that it was pointless, since unless you control the RECEIVING SYSTEM ALSO, things may not bounce AT ALL.

OS: Ubuntu Server 12.04
Postfix version: 2.9.1 (default for Ubuntu Server 12.04)

In logs I can see the DSN code and status=sent of "delivered to local mailbox", but nothing at all about bouncing on success (I'v added success to notification classes and created and added the bounce template's file). Yes I receive a bounce to the sender's mail and of the webmaster when the mail is sent to unexistent mailbox, but no when the message is sent successfully.

Now I'm trying to find a way using rsyslog to make some workaround, but would preffer to use integrated funcionality of postfix if so possible.

TB0ne 08-04-2014 01:27 PM

Quote:

Originally Posted by dmikam (Post 5214821)
Ok, my bad. I'm sorry. Thanks for pointing to my errors.

OS: Ubuntu Server 12.04 Postfix version: 2.9.1 (default for Ubuntu Server 12.04)

In logs I can see the DSN code and status=sent of "delivered to local mailbox", but nothing at all about bouncing on success (I'v added success to notification classes and created and added the bounce template's file). Yes I receive a bounce to the sender's mail and of the webmaster when the mail is sent to unexistent mailbox, but no when the message is sent successfully.

...which brings us back full-circle to "what you're trying to do is pointless". It remains so...unless the receiving server allows it, you will NOT be able to see anything past the delivered message.

Following the documentation on the link sent initially, and using/compiling the bounce.cf file is your only real choice. Restarting postfix when you're done makes it take effect. Did you follow those instructions exactly?
Quote:

Now I'm trying to find a way using rsyslog to make some workaround, but would preffer to use integrated funcionality of postfix if so possible.
The bounce.cf is all you can do...again, only if it's allowed by the receiving server, and the client themselves allows receipts.

dmikam 08-04-2014 02:42 PM

Quote:

Originally Posted by TB0ne (Post 5214830)
...which brings us back full-circle to "what you're trying to do is pointless". It remains so...unless the receiving server allows it, you will NOT be able to see anything past the delivered message.

Following the documentation on the link sent initially, and using/compiling the bounce.cf file is your only real choice. Restarting postfix when you're done makes it take effect. Did you follow those instructions exactly?

The bounce.cf is all you can do...again, only if it's allowed by the receiving server, and the client themselves allows receipts.

Yes, I think I followed instructions pretty well (the instructions are as simple as create a file bounce.cf, and the bounce_template_file to the main.conf). postconf -b /etc/postfix/bounce.cf shows the content of my newly created file. I have restarted postfix dozens of times - every time I change something.
Also I have default delay_warning_time = 0h and maximal_queue_lifetime = 5d - I don't think it would be a problem.

Also the manual says
Quote:

It is absolutely important that the file ends with an empty line!
so have I.


All times are GMT -5. The time now is 08:11 PM.