[Question] RE: sending warning message

Mark Sapiro mark at msapiro.net
Wed Jan 25 03:28:23 UTC 2017

On 01/24/2017 06:38 PM, Eoin Kim wrote:
> I am having a bit of trouble with configuring MailScanner regarding the
> notification. To be clear, my planned scenario is:
> 1.       Sending email from my company to the Internet with a bad
> attachment – sender (company user) receives a warning message, recipient
> doesn’t.

What do you mean by the recipient doesn't receive a warning. Are you
referring to the warning in the message that the attachment has been
removed? It seems so.

> 2.       Sending email from the Internet to my company with a bad
> attachment – recipient (company user) receives a warning message, sender
> doesn’t.

> And the notify_senders.rules is:
> From:                    a.b.c.d  yes
> FromOrTo:          default no
> a.b.c.d is the IP address of our mail server. Now, what is happening is:
> 1.       Sending email from my company to the Internet with a bad
> attachment – sender and recipient both receive a warning message.

The sender receives a separate warning message because of your

From:	a.b.c.d	yes

notify senders rule.

The recipient receives (I think) the message with the attachment
replaced by a warning and no other message. If this is what you are
seeing, this is the expected behavior

What do you want to happen in this case. If you want the message to be
sent without modification by MailScanner, you need a "Scan Messages"
rule set with

From:	a.b.c.d	no

to not scan outgoing messages.

If you want something else like, e.g., the attachment to be silently
removed without any indication that this was done, you might be able to
partially accomplish this with an "Attachment Warning Filename" ruleset with

From:	a.b.c.d	/dev/null

but I think that silently removing parts of a message is not a good idea.

Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

More information about the MailScanner mailing list