$postmastername and $localpostmaster - Where are they defined?

General eFa discussion
Post Reply
dbrunt
Posts: 64
Joined: 28 Nov 2015 00:09

$postmastername and $localpostmaster - Where are they defined?

Post by dbrunt »

$postmastername and $localpostmaster - Where are they defined?

Thanks,
Daniel
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: $postmastername and $localpostmaster - Where are they defined?

Post by shawniverson »

/etc/MailScanner/MailScanner.conf

Code: Select all

# Where to send the notices.
# This can also be the filename of a ruleset.
Notices To = postmaster

# Address of the local Postmaster, which is used as the "From" address in
# virus warnings sent to users.
# This can also be the filename of a ruleset.
Local Postmaster = postmaster
dbrunt
Posts: 64
Joined: 28 Nov 2015 00:09

Re: $postmastername and $localpostmaster - Where are they defined?

Post by dbrunt »

I have changed "Notices From = CLOUDtility MailScanner" and "Local Postmaster = mailscanner" in /etc/MailScanner/MailScanner.conf.
The variable $localpostmaster is reflected correctly in email generated as per /etc/mailscanner/reports/en/recipient.spam.report.txt but the variable $postmastername ("Notices From =") in the email remains unchanged. The email still says "From: MailScanner <mailscanner@..."
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: $postmastername and $localpostmaster - Where are they defined?

Post by shawniverson »

I will verify this, may be a bug.
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: $postmastername and $localpostmaster - Where are they defined?

Post by shawniverson »

Unable to reproduce? Was MailScanner restarted after the change?
dbrunt
Posts: 64
Joined: 28 Nov 2015 00:09

Re: $postmastername and $localpostmaster - Where are they defined?

Post by dbrunt »

Yes, the MailScanner service was restarted.
dbrunt
Posts: 64
Joined: 28 Nov 2015 00:09

Re: $postmastername and $localpostmaster - Where are they defined?

Post by dbrunt »

This is what we have currently:

Code: Select all

# The visible part of the email address used in the "From:" line of the
# notices. The <user@domain> part of the email address is set to the
# "Local Postmaster" setting.
Notices From = CLOUDtility_Mail_Scanner

# Where to send the notices.
# This can also be the filename of a ruleset.
Notices To = postmaster

# Address of the local Postmaster, which is used as the "From" address in
# virus warnings sent to users.
# This can also be the filename of a ruleset.
Local Postmaster = mailscanner
and this is what the email says:
From: MailScanner [mailto:mailscanner@our_domain.com]
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: $postmastername and $localpostmaster - Where are they defined?

Post by shawniverson »

I wonder if the "_" are a problem here? Tried it without any non-alphas?
dbrunt
Posts: 64
Joined: 28 Nov 2015 00:09

Re: $postmastername and $localpostmaster - Where are they defined?

Post by dbrunt »

I have just changed it to "CLOUDtility"
Last edited by dbrunt on 11 Dec 2015 17:47, edited 1 time in total.
dbrunt
Posts: 64
Joined: 28 Nov 2015 00:09

Re: $postmastername and $localpostmaster - Where are they defined?

Post by dbrunt »

Nope. Still says MailScanner...

Code: Select all

From: MailScanner [mailto:emailscanner@...] 
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: $postmastername and $localpostmaster - Where are they defined?

Post by shawniverson »

Wait, I wonder if these alerts are coming from mailwatch instead of MailScanner.

Take a look in /var/www/html/mailscanner/conf.php

Look for QUARANTINE_FROM_ADDR and QUARANTINE_REPORT_FROM_NAME
dbrunt
Posts: 64
Joined: 28 Nov 2015 00:09

Re: $postmastername and $localpostmaster - Where are they defined?

Post by dbrunt »

That report is already working correctly.

Code: Select all

// 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', 30);
define('QUARANTINE_MAIL_HOST', '127.0.0.1');
define('QUARANTINE_FROM_ADDR', 'emailscanner@mydomain.com');
define('QUARANTINE_REPORT_FROM_NAME', 'CLOUDtility Email Scanner');
define('QUARANTINE_REPORT_SUBJECT', 'My Daily Quarantine Report');
define('QUARANTINE_SUBJECT', 'Message released from quarantine');
define('QUARANTINE_MSG_BODY', 'Please find the original message that was quarantined attached to this email.

Code: Select all

From: CLOUDtility Email Scanner [mailto:emailscanner@mydomain.com] 
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: $postmastername and $localpostmaster - Where are they defined?

Post by shawniverson »

I'm going to assume this is a MailScanner bug, open an issue, and test some more.
dbrunt
Posts: 64
Joined: 28 Nov 2015 00:09

Re: $postmastername and $localpostmaster - Where are they defined?

Post by dbrunt »

I finally found where it is coming from:
/etc/MailScanner/reports/en/languages.conf:

Code: Select all

# Used in filename/filetype/content reports
MailScanner = MailScanner
Post Reply