Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Sendmail mail forwarding

Posted on 2010-09-24
6
Medium Priority
?
429 Views
Last Modified: 2012-05-10

Using sendmail/ procmail, how would you forward emails sent to user joe@localhost to forward to joe@remotehost, unless the email is larger than 1Mb or it has a Subject line that  includes the string “From Uncle Sam”.
0
Comment
Question by:farzanj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 26

Assisted Solution

by:jar3817
jar3817 earned 1500 total points
ID: 33753319
It's been a LONG time since I've used procmail...but this should be close:

:0hb
* ^To: joe@localhost
{
      :0HB
      * !^Subject: From Uncle Sam
      * < 1000000
      ! joe@remotehost
}
0
 
LVL 4

Assisted Solution

by:Tachion
Tachion earned 500 total points
ID: 33753406
This is not really answering your question directly, BUT, instead of doing this with procmail, you may want to consider "sieve". It allows you do to that and a whole lot more. See: http://en.wikipedia.org/wiki/Sieve_(mail_filtering_language)
and http://www.fastmail.fm/docs/sieve/

We use this with postfix, but a previous setup used it with procmail. It is a whole lot more user friendly than the archaic procmail language.
0
 
LVL 26

Assisted Solution

by:jar3817
jar3817 earned 1500 total points
ID: 33753541
If you're a perl guy you can use Mimedefang too with sendmail. I use this on my mail gateways and it gives you programmatic access to every step of the SMTP exchange.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 31

Author Comment

by:farzanj
ID: 33753586
Hi Jar3817,
Yes, I know Perl but could you please give me a more specific answer about how to use Mimedefang.  Never used this particular library.
0
 
LVL 26

Accepted Solution

by:
jar3817 earned 1500 total points
ID: 33753788
It's a sendmail milter. This will explain much of it: http://www.mimedefang.org/static/mimedefang-lisa04.pdf
0
 
LVL 31

Author Closing Comment

by:farzanj
ID: 33777879
Thank you experts!  All the recommendations are acceptable.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One-stop solution for Exchange Administrators to address all MS Exchange Server issues, which is known by the name of Stellar Exchange Toolkit.
The core idea of this article is to make you acquainted with the best way in which you can export Exchange mailbox to PST format.
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…
To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates…
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question