LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-17-2014, 05:03 AM   #1
mahedi.cse
LQ Newbie
 
Registered: Feb 2014
Location: Bangladesh
Posts: 2

Rep: Reputation: Disabled
Post How do I stop forwarding mail when sender match with receiver using .forward


I am using sedmail and .forward for forwarding list. But the problem is there when I sent mail to a particular contact that contains a list and me also in this list I got a copy of this mail. I want stop it in my server when sender match to one of the receiver of that list, it would be send to others member but not matches sender.

Please help me if you guys completed this task

Best Regards.

Last edited by mahedi.cse; 02-17-2014 at 10:04 PM.
 
Old 02-18-2014, 08:48 AM   #2
Rawcous
Member
 
Registered: Jan 2014
Location: Farnborough, Hampshire - UK
Distribution: 2 * CentOS 8.2 Self-Hosted Domain Servers (Mail & Web Server / FTP & VPN Server)
Posts: 107

Rep: Reputation: Disabled
Hello,

I believe that if you put an entry in the .forward file containing a backslash and the primary account name this should prevent the loop that you describe, thus:

Mail recipient contactA .forward file
\contactA, contactB, contactC, contactD

Mail recipient contactB .forward file
\contactB, contactA, contactC, contactD

Mail recipient contactC .forward file
\contactC, contactA, contactB, contactD

Mail recipient contactD .forward file
\contactD, contactA contactB, contactC

Regards,

Rawcous....
 
Old 02-18-2014, 11:45 PM   #3
mahedi.cse
LQ Newbie
 
Registered: Feb 2014
Location: Bangladesh
Posts: 2

Original Poster
Rep: Reputation: Disabled
Hello Rawcous,

Thanks for prompt effort. My configuration so similar with your suggestion but my problem is that when I sent mail to group (like contactA) and me self contactB and contactA has .forward file configure like
\contactA, contactB, contactC, contactD me also received a copy for this mail by generally. I want to prevent this if anyone send mail to a group and he also be be member of that group he will not got mail that sent by him...

If you have any way to prevent it will be very much helpful for me

Thanks
Mahedi
 
Old 02-20-2014, 08:17 AM   #4
Rawcous
Member
 
Registered: Jan 2014
Location: Farnborough, Hampshire - UK
Distribution: 2 * CentOS 8.2 Self-Hosted Domain Servers (Mail & Web Server / FTP & VPN Server)
Posts: 107

Rep: Reputation: Disabled
Hey,

Please define exactly what you mean by A, B, C, D are members of the same group - please explain how you have set this up.

Just to make sure my understanding is correct, you are saying.

If an email arrives at mailbox A, it is automatically forwarded to B,C,D

and

because of your .forward rules B,C,D are then each automatically forwarding a copy of the email back to A?

Thanks,

Rawcous!
 
Old 02-20-2014, 08:32 AM   #5
Rawcous
Member
 
Registered: Jan 2014
Location: Farnborough, Hampshire - UK
Distribution: 2 * CentOS 8.2 Self-Hosted Domain Servers (Mail & Web Server / FTP & VPN Server)
Posts: 107

Rep: Reputation: Disabled
Quote:
Originally Posted by Rawcous View Post
Hey,

Please define exactly what you mean by A, B, C, D are members of the same group - please explain how you have set this up.

Just to make sure my understanding is correct, you are saying.

If an email arrives at mailbox A, it is automatically forwarded to B,C,D

and

because of your .forward rules B,C,D are then each automatically forwarding a copy of the email back to A?

Thanks,

Rawcous!
Hello again...,

I've got a feeling that this link may be what you are referring to: http://www.bga.org/~lessem/psyc5112/usail/mail/lists/

If you are going to use the suggested approach then remember to remove the .forward entries from each of the respective ~ home folders / directories and also run the newaliases command after making any amendments to the /etc/aliases file.

Regards,

Rawcous!!!
 
  


Reply


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
potfix email filter based on sender and recipient to forward messages edmundasv Linux - Server 3 11-04-2010 04:23 AM
Forward mail based on sender id_viorel Linux - Server 2 08-30-2010 05:28 AM
Mail Forwarding in postfix/maildrop/redhat (like yahoo mail forwarding) topcat Linux - Software 1 08-31-2007 12:10 PM
How do I get cron mail to stop forwarding through localhost on CentOS 4? alexmkt Linux - Enterprise 3 11-23-2005 01:27 PM
cant see .forward file in home directory >> mail forward/copy steve_babbage Linux - Newbie 0 03-02-2004 06:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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