LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-28-2016, 01:44 AM   #1
WiseDraco
Member
 
Registered: Nov 2006
Location: Europe,Latvia,Riga
Distribution: slackware,slax, OS X, exMandriva
Posts: 591

Rep: Reputation: 73
Question procmail, log outgoing mail with to: from: subject: fields....?


Hello!
I have linux host (mss), who send system emails via another host - mailserver.

on that mss host i need to see also "subject" line in logfile.
mail sending on that host is organized via sendmail

in /var/maillog there is "from:" and "to:" info, but no "subject:" information.

try to dig in procmail direction, by using procmailrc in /etc/ , and even discover, what way i can get "to:" field in procmail log ( in default tehre is only "from", and "subject:"), but looks like, procmail processing only incoming mails, not outgoing?
i need outgoing mails logging too.

there is any advice in that?
 
Old 04-28-2016, 03:10 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

You can take a look at this thread here at LQ.

Regards
 
1 members found this post helpful.
Old 04-28-2016, 06:02 AM   #3
WiseDraco
Member
 
Registered: Nov 2006
Location: Europe,Latvia,Riga
Distribution: slackware,slax, OS X, exMandriva
Posts: 591

Original Poster
Rep: Reputation: 73
Quote:
Originally Posted by bathory View Post
Hi,

You can take a look at this thread here at LQ.

Regards
Thanks, i try it, but that way require sendmail reconfiguring and restart - who was not very good, since it is very important 24/7 server.

much better be option to get logs via procmail, if it is possible...
 
Old 04-28-2016, 07:01 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by WiseDraco View Post
Thanks, i try it, but that way require sendmail reconfiguring and restart - who was not very good, since it is very important 24/7 server.

much better be option to get logs via procmail, if it is possible...
It's not possible, because procmail is a MDA (Message Delivery Agent), meaning that it works on the recipient side.
If you want to log the mail subject on the sending side, then you need to follow the link above.
Restarting sendmail takes only 1 sec, so I don't think it's a problem. Just make sure to keep backups of the files you're going to edit.
 
  


Reply

Tags
outgoing mails, procmail, sendmail


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
procmail - passing part of subject to command td3201 Linux - Server 1 04-11-2015 04:12 AM
Which qmail log file details outgoing mail? (have huge outgoing mail volume) hilljockey Linux - Server 2 12-08-2008 04:26 PM
procmail change subject paul_mat Linux - Software 1 10-02-2006 07:01 AM
Filtering outgoing mail through Procmail SlackDaemon Linux - Newbie 2 06-22-2006 07:05 AM
Procmail or other filter for outgoing mail gabriele_101 Linux - Software 3 08-18-2003 05:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration