LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-11-2006, 11:13 AM   #1
tkmuthuvel
LQ Newbie
 
Registered: Mar 2003
Location: Coimbatore
Posts: 25

Rep: Reputation: 15
Red face Need help POSTFIX,PROCMAIL


Dear all

I have configured POSTFIX mail server in REDHAT LINUX

also configured fetchmailrc which download mail from particular domain and save to local user's local mail box[downnload individual mail box in remote server also save to local individual mailbox]

OK now i got mail from remote mailserver and saved local mail box.fine

Mail sending through Postfix ok. Well.

I enabled "Always_bcc = allmail" in postfix main.cf

So all send and recive mail make a copy to "allmail" user's mail box

MY PROBLEM [Needed] is:

Certain group of users [like 10 users or may be more than 10 users ]mails both Sending and Receiving should make a copy to a single user mail box[ eg., username as "tenusers"]

so i can see that 10 user's sending and receiving mail by that user [tenusers] mail box.

can i do it?

if there is any possibility in main.cf?

can i do it with Procmailrc? if yes pls give the example and where i have to save that file?

pls help me

k.Muthuvel
 
Old 04-11-2006, 12:30 PM   #2
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
Look into recipient_bcc_maps and sender_bcc_maps.
 
Old 04-11-2006, 11:14 PM   #3
tkmuthuvel
LQ Newbie
 
Registered: Mar 2003
Location: Coimbatore
Posts: 25

Original Poster
Rep: Reputation: 15
Post Example postfix recipient_bcc and sender_bcc_maps

Dear Berhanie

Could please give example for my current situation how to use "recipient_bcc_maps and sender_bcc_maps"

I refered some like about "recipient_bcc_maps and sender_bcc_maps" in postfix but i couldn't understand properly

so pls give some tip or example

can i get it?

Regards
K.Muthuvel
 
Old 04-12-2006, 09:24 AM   #4
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
Suppose you wanted a copy of all incoming mail to certain users. Your main.cf should have:
Code:
recipient_bcc_maps = hash:/etc/postfix/recipient_bcc
/etc/postfix/recipient_bcc would look something like this:
Code:
someuse@mysite.com         admin@mysite.com
anotheruser@mysite.com     admin@mysite.com
Then, create the .db file and reload postfix:
Code:
postmap /etc/postfix/recipient_bcc
postfix reload
To read those users' outgoing mail, do the identical thing with sender_bcc_maps.
 
Old 04-15-2006, 04:05 AM   #5
tkmuthuvel
LQ Newbie
 
Registered: Mar 2003
Location: Coimbatore
Posts: 25

Original Poster
Rep: Reputation: 15
Post recipient_bcc_maps not OK

Dear friend


Thanks for helping

i did well sender_bcc_maps.it's working fine


but recipient_bcc_maps is not ok

my settings is

fetchmail from remote site and put to appropriate locate Linux user mail box.
r

recipient_bcc_maps is ok when mail is reciving from local linux user and send to [ie., transfer to another local user by MTA (postfix)] another local linux user.

at the same time fetched mails [by .fetchmailrc] ONLY send to appropriate users mail box who is mentioned in .fetchmailrc file . i think it never check /etc/postfix/recipient_bcc file for to deliver common user or monitoring user or who want to get one or more users mail copy.

so i couldn't get another [never add bcc for reciving (fetched mails)mail] copy of the same mail to common user or monitoring user or who want to get one or more users mail copy.


i cheked by stoping postfix that time mails are not delivered even local user also.

so after mail fetched from remote server where it has gone .

but mail is deliver to excact user who is noted in .ferchmailrc file


so how can i get it?

so pls help me


Regards
K.Mtuhuvel
 
Old 04-15-2006, 04:08 AM   #6
tkmuthuvel
LQ Newbie
 
Registered: Mar 2003
Location: Coimbatore
Posts: 25

Original Poster
Rep: Reputation: 15
Post recipient_bcc_maps not OK

Dear friend


Thanks for helping

i did well sender_bcc_maps.it's working fine


but recipient_bcc_maps is not ok

my settings is:

fetchingmail from remote site and put to appropriate local Linux user mail box.


recipient_bcc_maps is ok when mail is reciving from local linux user and send to [ie., transfer to another local user by MTA (postfix)] another local linux user.

at the same time fetched mails [by .fetchmailrc] ONLY send to appropriate users mail box who is mentioned in .fetchmailrc file . i think it never check /etc/postfix/recipient_bcc file for to deliver common user or monitoring user or who want to get one or more users mail copy.

so i couldn't get another [never add bcc for reciving (fetched mails)mail] copy of the same mail to common user or monitoring user or who want to get one or more users mail copy.


i cheked by stoping postfix that time mails are not delivered even local user also.

so after mail fetched from remote server where it has gone? .

but mail is deliver to excact user who is noted in .ferchmailrc file


so how can i get it?

so pls help me


Regards
K.Mtuhuvel
 
Old 04-17-2006, 06:04 PM   #7
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
Hello, tkmuthuvel.

With a minimal fetchmail configuration, mail comes in with an envelope address of the form user@localhost, which postfix then rewrites to user@localhost.mysite.com. The key (i.e. the left side) of the recipient_bcc table must match this address. An easy solution for recipient_bcc is:
Quote:
someuser admin@mysite.com
anotheruser admin@mysite.com
This will match both someuser@mysite.com and someuser@localhost.mysite.com.

If your config is more complicated, then can always specify the full address in the key, as I did above, but taking fetchmail into account:
Quote:
someuser@mysite.com admin@mysite.com
someuser@localhost.mysite.com admin@mysite.com

anotheruser@mysite.com admin@mysite.com
anotheruser@localhost.mysite.com admin@mysite.com
A third option is to tell fetchmail to write the envelope address that you want (look for the smtpaddress option on the fetchmail man page).

Last edited by Berhanie; 04-17-2006 at 06:18 PM.
 
Old 04-18-2006, 06:05 AM   #8
tkmuthuvel
LQ Newbie
 
Registered: Mar 2003
Location: Coimbatore
Posts: 25

Original Poster
Rep: Reputation: 15
Thanks forever

Dear friend


Hearty Thanks i did well both send and receving.


i have onemore doubt

can i update postfix v1 to postfix v2 in REDHAT LINUX 9 with default kernel version?


Muthuvel.K
 
Old 04-18-2006, 09:50 AM   #9
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
postfix does not care which kernel you use. But, RPM binaries are compiled in a particular environment, and may not work outside of it. Make sure that you install an RPM made specifically for Redhat 9. If this is a production system, you might seek advice from someone who uses Redhat.
 
Old 04-18-2006, 11:31 PM   #10
tkmuthuvel
LQ Newbie
 
Registered: Mar 2003
Location: Coimbatore
Posts: 25

Original Poster
Rep: Reputation: 15
Post can i get procmail details

Dear sir,


Ok with most of u'r help i did Sender_bcc and recipient_bcc well.



i feel we can filter the mail[i mean what we did last,ie both sending and receiving of some users mail to certain user ID] by using procmailrc file.

Here i would like to take a user home directory or /etc/pocmailrc to write .procmailrc file who is noted Always_bcc line in main.cf file

if i take this type what should be the line in .procmailrc file

help me

Muthuvel.K
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
need Procmail or postfix information tkmuthuvel Linux - Networking 1 04-11-2006 11:35 AM
postfix - procmail, fetchmail varun_saa Mandriva 3 09-11-2005 12:53 AM
Using Procmail with Postfix jomy Linux - Networking 1 06-05-2005 09:38 AM
postfix/procmail doesn't deliver emails! eisman Ubuntu 1 05-18-2005 09:21 AM
postfix, procmail, cyrus jonin Linux - Software 0 10-15-2004 02:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:36 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