"New Mail"-Notification via smbclient

"New Mail"-Notification via smbclient

Post by Marcus Faur » Sat, 23 Jan 1999 04:00:00



Hi,

I am running a linux mailserver that receives mail via UUCP over TCP.
The mails are sorted into the users' mailfolders in /var/spool/mail via
procmail and are fetched from windows clients with pop3.
The problem is that some users never check if new messages arrived, so i
decided to put winpopup into the startup folder and run smbclient to
notify them.
But - you guessed it - I could not figure out how to do it.
For testing, I just piped the whole message into smbclient via
/etc/aliases:

joe.user: "|/usr/bin/smbclient -M winhost -d 3 > /tmp/debuglog"

/tmp/debuglog says, that 500 or so bytes are transmitted. Only winpopup
does not popup. This works perfectly with exactly the same debuglog
when run from the commandline (no matter under what uid) , e.g.

cat /var/spool/mail/joe.user|/usr/bin/smbclient -M winhost -d 3 > /tmp/debuglog

I also tried to run smbclient from .forward with the same result. When put
into /etc/aliases, smbclient is executed as user daemon, but this does
not seem to be the problem because su - daemon, cat cat /var/spool/mail[..]
works.

Any ideas?

Marcus

 
 
 

"New Mail"-Notification via smbclient

Post by Andrzej Fili » Sat, 23 Jan 1999 04:00:00



> I am running a linux mailserver that receives mail via UUCP over TCP.
> The mails are sorted into the users' mailfolders in /var/spool/mail via
> procmail and are fetched from windows clients with pop3.
> The problem is that some users never check if new messages arrived, so i
> decided to put winpopup into the startup folder and run smbclient to
> notify them.
> But - you guessed it - I could not figure out how to do it.
> For testing, I just piped the whole message into smbclient via
> /etc/aliases:

> joe.user: "|/usr/bin/smbclient -M winhost -d 3 > /tmp/debuglog"

> /tmp/debuglog says, that 500 or so bytes are transmitted. Only winpopup
> does not popup. This works perfectly with exactly the same debuglog
> when run from the commandline (no matter under what uid) , e.g.

> cat /var/spool/mail/joe.user|/usr/bin/smbclient -M winhost -d 3 > /tmp/debuglog

> I also tried to run smbclient from .forward with the same result. When put
> into /etc/aliases, smbclient is executed as user daemon, but this does
> not seem to be the problem because su - daemon, cat cat /var/spool/mail[..]
> works.

try:
|/usr/bin/formail -X from: -X subject: |/usr/bin/smbclient -M winhost -d 3 >
/tmp/debuglog

It should forward only from and subject headers.
--
Andrzej (Andrew) A. Filip


 
 
 

"New Mail"-Notification via smbclient

Post by Jim Richards » Sun, 24 Jan 1999 04:00:00


On 22 Jan 1999 08:52:27 GMT,

 brought forth the following words...:

Quote:

>Hi,

>I am running a linux mailserver that receives mail via UUCP over TCP.
>The mails are sorted into the users' mailfolders in /var/spool/mail via
>procmail and are fetched from windows clients with pop3.
>The problem is that some users never check if new messages arrived, so i
>decided to put winpopup into the startup folder and run smbclient to
>notify them.
>But - you guessed it - I could not figure out how to do it.
>For testing, I just piped the whole message into smbclient via
>/etc/aliases:

>joe.user: "|/usr/bin/smbclient -M winhost -d 3 > /tmp/debuglog"

>/tmp/debuglog says, that 500 or so bytes are transmitted. Only winpopup
>does not popup. This works perfectly with exactly the same debuglog
>when run from the commandline (no matter under what uid) , e.g.

>cat /var/spool/mail/joe.user|/usr/bin/smbclient -M winhost -d 3 > /tmp/debuglog

>I also tried to run smbclient from .forward with the same result. When put
>into /etc/aliases, smbclient is executed as user daemon, but this does
>not seem to be the problem because su - daemon, cat cat /var/spool/mail[..]
>works.

>Any ideas?

>Marcus

I don't know if this helps, but the samba docs mention some sort of limit for
winpopup messages that cat can be used to get around, maybe there is more
information in the smbclient man page?
--
Jim Richardson
        Anarchist, pagan and proud of it
WWW.eskimo.com/~warlock
        Linux, because life's too short for a buggy OS.