Quantcast

global maildrop log file?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

global maildrop log file?

Bob Bernstein
I want three users to share a common maildrop logfile.

/etc/maildroprc contains one line:
LOGFILE="/etc/mailfilterlog"

ls -l /etc/mailfilterlog gives:
-rw-rw-r-- 1 root users 0 Feb 16 18:43 mailfilterlog

The $HOME/.mailfilter files begin like this:
DEFAULT="$HOME/mail/inbox"
#logfile "$HOME/.mailfilterlog"
logfile "/etc/mailfilterlog"

Several messages to the users affected arrive, but
/etc/mailfilterlog remains zero length.

Extra credit question: <g>
Where should I look for error messages related to this issue?

Thanks for any insight shared!

--
Bob Bernstein

                         

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Courier-maildrop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: global maildrop log file?

Sam Varshavchik
Bob Bernstein writes:

> I want three users to share a common maildrop logfile.
>
> /etc/maildroprc contains one line:
> LOGFILE="/etc/mailfilterlog"
>
> ls -l /etc/mailfilterlog gives:
> -rw-rw-r-- 1 root users 0 Feb 16 18:43 mailfilterlog
>
> The $HOME/.mailfilter files begin like this:
> DEFAULT="$HOME/mail/inbox"
> #logfile "$HOME/.mailfilterlog"
> logfile "/etc/mailfilterlog"
>
> Several messages to the users affected arrive, but
> /etc/mailfilterlog remains zero length.
Are these users members of the "users" group, which is required for write  
access to this file?

> Extra credit question: <g>
> Where should I look for error messages related to this issue?
>
> Thanks for any insight shared!

Presumably, you have configured your mail server to use maildrop to deliver  
mail. maildrop will generally report messages to standard error. Therefore,  
any error messages will be logged wherever your mail server logs standard  
error from mail delivery agents.

However, if maildrop cannot open the log file, maildrop will immediately  
terminate after reporting the error, and not deliver the message.

Since you say that your mail was delivered, this suggests that your mail  
server is not using maildrop to deliver mail, as you think it is doing.  
Check and verify your mail server's configuration.


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Courier-maildrop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop

attachment0 (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: global maildrop log file?

Bob Bernstein
On Mon, Feb 16, 2015 at 09:17:17PM -0500, Sam Varshavchik wrote:

> Are these users members of the "users" group, which is required
> for write access to this file?

Yes.

There are error messages in /var/log/messages:

"temporary failure. Command output: /usr/bin/maildrop: Unable to
create log file."

I note that this error occurs whether or not the needed logfile is
already there.

I've changed the sought-after "global" logfile to:
"/var/log/maildroplog" where ls -l for that file is:
-rw-rwxr-- 1 root users 0 Feb 16 23:49 maildroplog.

I wonder if I should have a user other than root own that logfile in
/var/log?

If I revert (in $HOME/.mailfilter) to the old logfile assignment
"$HOME/.mailfilterlog" then messages caught in the temporary limbo
are found and delivered.

Thanks,

--
These are not the droids you are looking for.

                         

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Courier-maildrop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: global maildrop log file?

Sam Varshavchik
Bob Bernstein writes:

> On Mon, Feb 16, 2015 at 09:17:17PM -0500, Sam Varshavchik wrote:
>
> > Are these users members of the "users" group, which is required
> > for write access to this file?
>
> Yes.
>
> There are error messages in /var/log/messages:
>
> "temporary failure. Command output: /usr/bin/maildrop: Unable to
> create log file."
>
> I note that this error occurs whether or not the needed logfile is
> already there.
>
> I've changed the sought-after "global" logfile to:
> "/var/log/maildroplog" where ls -l for that file is:
> -rw-rwxr-- 1 root users 0 Feb 16 23:49 maildroplog.
>
> I wonder if I should have a user other than root own that logfile in
> /var/log?
This shouldn't be complicated to figure out. There's nothing unusual or  
bizarre going on here. A process either can or cannot write to a file based  
on the file permissions. The file listed above is writable by root, or by  
the group "users". If maildrop can't write to it, then its process doesn't  
meet either requirement.

The easiest way to see what permissions maildrop runs as is to change  
logfile to point to some file in tmp, do a test delivery, and see with which  
permissions maildrop is going to create the new log file in /tmp as.


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Courier-maildrop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop

attachment0 (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: global maildrop log file?

Bob Bernstein
I think we have achieved escape velocity. <g>

On Tue, Feb 17, 2015 at 06:59:36AM -0500, Sam Varshavchik wrote:

> The easiest way to see what permissions maildrop runs as is to
> change logfile to point to some file in tmp, do a test delivery,
> and see with which permissions maildrop is going to create the new
> log file in /tmp as.

That produced in /tmp:

-rw------- 1 bob    mail   1932 Feb 17 14:16 maildroplog

I added all three users to the mail group and did a chmod g+rw and
now this appears to be working as desired i.e. "globally," one log
file recording three users' mail traffic. (poobah being of course
another of the three users):

-rw-rw---- 1 poobah mail   1891 Feb 17 15:21 maildroplog

One caveat for anyone who cares to trod this way: convince yourself
completely that new group memberships REALLY now belong to the users
you are working with! Hint: sometimes a login is not a login.

Thank you again,

--
These are not the droids you are looking for.

                         

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Courier-maildrop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop
Loading...