Quantcast

Where are bounce messages for milters configured?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Where are bounce messages for milters configured?

Linda Pagillo
Hi everyone. Quick question... I have a milter set up to check at smtp connection time. When the milter rejects a message, the sender gets a particular bounce message. I need to know how to change the text of that bounce message. I want it to say something else. Where can I do this? Thanks.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Where are bounce messages for milters configured?

Viktor Dukhovni

> On Mar 10, 2017, at 10:50 AM, Linda Pagillo <[hidden email]> wrote:
>
> When the milter rejects a message, the sender gets a particular bounce message. I need to know how to change the text of that bounce message.

The body of the bounce message is generated by the sending system,
and cannot be specified by the receiving Postfix system that rejects
the message.  Only the short (typically one line) SMTP error response,
that is typically included in the bounce report, originates with Postfix.
That one line response is generated by the milter.  Configure the milter
to emit an appropriate reject message.

--
        Viktor.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Where are bounce messages for milters configured?

Linda Pagillo
Thanks Viktor. I appreciate your answer. The weird thing is, I looked in the milter config file and I don't see a place to do this.

On Fri, Mar 10, 2017 at 9:56 AM, Viktor Dukhovni <[hidden email]> wrote:

> On Mar 10, 2017, at 10:50 AM, Linda Pagillo <[hidden email]> wrote:
>
> When the milter rejects a message, the sender gets a particular bounce message. I need to know how to change the text of that bounce message.

The body of the bounce message is generated by the sending system,
and cannot be specified by the receiving Postfix system that rejects
the message.  Only the short (typically one line) SMTP error response,
that is typically included in the bounce report, originates with Postfix.
That one line response is generated by the milter.  Configure the milter
to emit an appropriate reject message.

--
        Viktor.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Where are bounce messages for milters configured?

Mario Theodoridis
On 10/03/17 17:08, Linda Pagillo wrote:
> Thanks Viktor. I appreciate your answer. The weird thing is, I looked in
> the milter config file and I don't see a place to do this.

Depending on the milter you use, you either do this in the milter code,
or some config file for that particular milter.

--
Mit Freundlichen Grüßen / Regards

Mario Theodoridis

regify GmbH
Römerstrasse 39 | D-78183 Hüfingen
Amtsgericht Freiburg HRB 709343
Telefon: +49 771 8978 4238
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Where are bounce messages for milters configured?

Linda Pagillo
In reply to this post by Linda Pagillo
In the milter configuration file, there is a line which says...

Reject - Reject the message, return SMFIS_REJECT*

Where do I find SMFIS_REJECT* ?

On Fri, Mar 10, 2017 at 10:08 AM, Linda Pagillo <[hidden email]> wrote:
Thanks Viktor. I appreciate your answer. The weird thing is, I looked in the milter config file and I don't see a place to do this.

On Fri, Mar 10, 2017 at 9:56 AM, Viktor Dukhovni <[hidden email]> wrote:

> On Mar 10, 2017, at 10:50 AM, Linda Pagillo <[hidden email]> wrote:
>
> When the milter rejects a message, the sender gets a particular bounce message. I need to know how to change the text of that bounce message.

The body of the bounce message is generated by the sending system,
and cannot be specified by the receiving Postfix system that rejects
the message.  Only the short (typically one line) SMTP error response,
that is typically included in the bounce report, originates with Postfix.
That one line response is generated by the milter.  Configure the milter
to emit an appropriate reject message.

--
        Viktor.



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Where are bounce messages for milters configured?

Linda Pagillo
Also, is SMFIS_REJECT* even a file where I can configure a bounce message or is it just a protocol which means "reject".

On Fri, Mar 10, 2017 at 10:18 AM, Linda Pagillo <[hidden email]> wrote:
In the milter configuration file, there is a line which says...

Reject - Reject the message, return SMFIS_REJECT*

Where do I find SMFIS_REJECT* ?

On Fri, Mar 10, 2017 at 10:08 AM, Linda Pagillo <[hidden email]> wrote:
Thanks Viktor. I appreciate your answer. The weird thing is, I looked in the milter config file and I don't see a place to do this.

On Fri, Mar 10, 2017 at 9:56 AM, Viktor Dukhovni <[hidden email]> wrote:

> On Mar 10, 2017, at 10:50 AM, Linda Pagillo <[hidden email]> wrote:
>
> When the milter rejects a message, the sender gets a particular bounce message. I need to know how to change the text of that bounce message.

The body of the bounce message is generated by the sending system,
and cannot be specified by the receiving Postfix system that rejects
the message.  Only the short (typically one line) SMTP error response,
that is typically included in the bounce report, originates with Postfix.
That one line response is generated by the milter.  Configure the milter
to emit an appropriate reject message.

--
        Viktor.




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Where are bounce messages for milters configured?

Jim Reid

> On 10 Mar 2017, at 16:48, Linda Pagillo <[hidden email]> wrote:
>
> Also, is SMFIS_REJECT* even a file where I can configure a bounce message or is it just a protocol which means "reject”.

SMFIS_REJECT is a status/error code in the milter protocol. What some milter application does when SMFIS_REJECT gets returned depends on that milter. Consult its documentation or read the software's source code. You might also find it helpful to read the milter documentation that is part of sendmail distribution since that includes the source code for building libmilter and its API which all milters depend on.

If you’re looking for advice here about a specific milter, it would help if you told the list which one you’re trying to configure. There’s bound to be someone on this list who will already be using that milter. But if you can’t/won’t say what that milter is, they won’t be able to guess that and therefore offer specific advice on how to go about configuring it or tailoring it to your needs.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Where are bounce messages for milters configured?

Viktor Dukhovni

> On Mar 10, 2017, at 12:22 PM, Jim Reid <[hidden email]> wrote:
>
>
>> On 10 Mar 2017, at 16:48, Linda Pagillo <[hidden email]> wrote:
>>
>> Also, is SMFIS_REJECT* even a file where I can configure a bounce message or is it just a protocol which means "reject”.
>
> SMFIS_REJECT is a status/error code in the milter protocol. What some milter application does when SMFIS_REJECT gets returned depends on that milter. Consult its documentation or read the software's source code. You might also find it helpful to read the milter documentation that is part of sendmail distribution since that includes the source code for building libmilter and its API which all milters depend on.
>
> If you’re looking for advice here about a specific milter, it would help if you told the list which one you’re trying to configure. There’s bound to be someone on this list who will already be using that milter. But if you can’t/won’t say what that milter is, they won’t be able to guess that and therefore offer specific advice on how to go about configuring it or tailoring it to your needs.

Instead of providing a boolean reject/accept verdict, a "polite"
milter can provide a complete SMTP [45]XXX response.  From the
Postfix src/milter/milter8.c file:

            /*
             * Decision: "ddd d.d+.d+ text". This decision is final (i.e.
             * Sendmail 8 changes receiver state). Note: the reply may be in
             * multi-line SMTP format.
             *
             * XXX Sendmail compatibility: sendmail 8 uses the reply as a format
             * string; therefore any '%' characters in the reply are doubled.
             * Postfix doesn't use replies as format strings; we replace '%%'
             * by '%', and remove single (i.e. invalid) '%' characters.
             */
        case SMFIR_REPLYCODE:
                ...

So the milter code in question would be constructing a REPLYCODE along the
lines of "550 5.7.1 ...".

--
        Viktor.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Where are bounce messages for milters configured?

Linda Pagillo
Thank you guys for all of your responses. The milter I'm using is the Arm Research Message Sniffer milter called SNFMilter. At this time, I don't think there is a way to configure this milter to return a specific bounce message.

On Fri, Mar 10, 2017 at 12:21 PM, Viktor Dukhovni <[hidden email]> wrote:

> On Mar 10, 2017, at 12:22 PM, Jim Reid <[hidden email]> wrote:
>
>
>> On 10 Mar 2017, at 16:48, Linda Pagillo <[hidden email]> wrote:
>>
>> Also, is SMFIS_REJECT* even a file where I can configure a bounce message or is it just a protocol which means "reject”.
>
> SMFIS_REJECT is a status/error code in the milter protocol. What some milter application does when SMFIS_REJECT gets returned depends on that milter. Consult its documentation or read the software's source code. You might also find it helpful to read the milter documentation that is part of sendmail distribution since that includes the source code for building libmilter and its API which all milters depend on.
>
> If you’re looking for advice here about a specific milter, it would help if you told the list which one you’re trying to configure. There’s bound to be someone on this list who will already be using that milter. But if you can’t/won’t say what that milter is, they won’t be able to guess that and therefore offer specific advice on how to go about configuring it or tailoring it to your needs.

Instead of providing a boolean reject/accept verdict, a "polite"
milter can provide a complete SMTP [45]XXX response.  From the
Postfix src/milter/milter8.c file:

            /*
             * Decision: "ddd d.d+.d+ text". This decision is final (i.e.
             * Sendmail 8 changes receiver state). Note: the reply may be in
             * multi-line SMTP format.
             *
             * XXX Sendmail compatibility: sendmail 8 uses the reply as a format
             * string; therefore any '%' characters in the reply are doubled.
             * Postfix doesn't use replies as format strings; we replace '%%'
             * by '%', and remove single (i.e. invalid) '%' characters.
             */
        case SMFIR_REPLYCODE:
                ...

So the milter code in question would be constructing a REPLYCODE along the
lines of "550 5.7.1 ...".

--
        Viktor.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Where are bounce messages for milters configured?

Den1
Since Linda brought it up I thought I would pop in as well. That's exactly what I tried to configure too but in spamass-milter in combination with Postfix. It's working OK but always says this,

5xx Reject milter ----------------------------
END-OF-MESSAGE
185.127.117.96   server52744.sledco.com
Blocked by SpamAssassin

The line I tried to change was "Blocked by SpamAssassin" but I gave it up as I couldn't find it where and how to do it. Any pointers on this specific milter would also be highly appreciated. Many thanks!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Where are bounce messages for milters configured?

Tom Hendrikx
On 11-03-17 15:17, Den1 wrote:

> Since Linda brought it up I thought I would pop in as well. That's exactly
> what I tried to configure too but in spamass-milter in combination with
> Postfix. It's working OK but always says this,
>
> 5xx Reject milter ----------------------------
> END-OF-MESSAGE
> 185.127.117.96   server52744.sledco.com
> Blocked by SpamAssassin
>
> The line I tried to change was "Blocked by SpamAssassin" but I gave it up as
> I couldn't find it where and how to do it. Any pointers on this specific
> milter would also be highly appreciated. Many thanks!
>
The easiest trick to achieve this is to configure the milter to add a
header in stead of rejecting.

Then use postfix milter_headers_checks option to detect the header and
make postfix send the reject, including your custom message. I use this
with clamav and spamass-milter. Not sure about SNFMilter, never used
that one.

Kind regards,

        Tom



signature.asc (845 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Where are bounce messages for milters configured?

Den1
Tom Hendrikx wrote
The easiest trick to achieve this is to configure the milter to add a
header in stead of rejecting.

Then use postfix milter_headers_checks option to detect the header and
make postfix send the reject, including your custom message. I use this
with clamav and spamass-milter. Not sure about SNFMilter, never used
that one.

Kind regards,

        Tom
Thank you so much Tom! That's a pretty cool idea! Could you please, also send/post an example of how it is set (your config) of spamass-milter? Mnay thanks!
Loading...