Release Block Attachments with Sendmail

Questions and answers about how to do stuff
Post Reply
jsm0377
Posts: 1
Joined: 20 Oct 2016 13:33

Release Block Attachments with Sendmail

Post by jsm0377 »

I've tried searching the site and can't seem to find the answer to my particular situation. I'm trying to test releasing attachments using sendmail but the message never goes out. 127.0.0.1 is already whitelisted, so it's not a problem with the message being re flagged as bad content. The SMTP logs on the Exchange server don't even show a connection from EFA for this message and nothing that I can see in the maillog. Here is the setup for the quarantine:

Code: Select all

/* Quarantine settings */

// The quarantine flag is only available on MailScanner >=4.43
// it will dramtically improved the speed of quarantine operations
// but requires that you use the quarantine_maint.php in place of
// the clean.quarantine script provided with MailScanner.
define('QUARANTINE_USE_FLAG', true);
define('QUARANTINE_DAYS_TO_KEEP', 60);
define('QUARANTINE_MAIL_HOST', '127.0.0.1');
define('QUARANTINE_FROM_ADDR', 'spamfilter@domain.com');
define('QUARANTINE_REPORT_FROM_NAME', 'EFA - Email Filter Appliance');
define('QUARANTINE_REPORT_SUBJECT', 'Message Quarantine Report');
define('QUARANTINE_SUBJECT', 'Message released from quarantine');
define('QUARANTINE_MSG_BODY', 'Please find the original message that was quarantined attached to this mail.

Regards,
Postmaster');
define('QUARANTINE_REPORT_HOSTURL', 'http://'.chop(`hostname`).'/mailscanner/');
define('QUARANTINE_REPORT_DAYS', 7);

// set QUARANTINE_USE_SENDMAIL to true to send released email as original email using sendmail,
//                                false to send it as an attachment to a release message
define('QUARANTINE_USE_SENDMAIL', false);
define('QUARANTINE_SENDMAIL_PATH', '/usr/sbin/sendmail');
With this set: (QUARANTINE_USE_SENDMAIL', false) I can receive the attachment but it is breaking the email chain which will cause problems with the email archive service we use.

If I can get this working, we are going to set up EFA on a much larger scale to handle filtering for all of our clients. We like the idea of giving our clients the ability to release their own messages/attachments. Any help would be appreciated.
ItemsGmbH
Posts: 24
Joined: 20 Dec 2018 14:53

Re: Release Block Attachments with Sendmail

Post by ItemsGmbH »

I face the same problem at the moment.
If i release a blocked mail without attachment i would love to send it "as is", without tempering the sender
For a mail with blocked attachment it would be perfect, to send the whole message WITH attachment again

It looks like sendmail can not handle it, because it is blocked again

Your entry for 127.0.0.1 only works if you don't use sendmail for releasing a mail
User avatar
pdwalker
Posts: 1553
Joined: 18 Mar 2015 09:16

Re: Release Block Attachments with Sendmail

Post by pdwalker »

Is there anything in the efa interface, or in the log files when you try to resubmit the messages?

A problem I've had is when a message gets false flagged as a virus and blocked. In this case, I had to update my virus signature whitelist, restart clamd, and then resubmit the message to the mail queue for (hopefully) re-delivery using the command

Code: Select all

/usr/sbin/sendmail.postfix -t < $FILE/message
where $FILE is /var/spool/MailScanner/quarantine/spam/<DATE>/<MESSAGEID>
Post Reply