LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 05-13-2012, 07:33 AM   #1
hua
Member
 
Registered: Oct 2006
Location: Slovak Republic
Distribution: Slackware 14.2, current
Posts: 461

Rep: Reputation: 78
procmail doesn't work with some email addresses


Hello
I try to copy the sent emails of several local users to their local manager email imap-mailbox. The manager should get for example the sent emails from 5 local user acounts.
My problem is that my rules in procmailrc work with several email recipients but not with others. For example:
Quote:
user 1 sends email to some external email address
mail from user1@local.com rcpt to some@external.com
..
successfully copied to /home/boss/managers
-----------
user 1 sends email to some another external email address
mail from user1@local.com rcpt to some@other-ext.com
..
nothing happens ...
Although in /var/log/maillog I can see the exact From: user1@local.com sender. But the procmail doesn't cache this one. What do I miss.

My procmailrc file:
Code:
# file: /etc/procmailrc
# global procmailrc
SHELL="/bin/bash"
SENDMAIL="/usr/sbin/sendmail -oi -t"
LOGFILE="/var/log/procmail.log"
:0H
* ^From.*user1@local.com
{
    :0
    /home/boss/manager
}
:0H
* ^From.*user2@local.com
{
    :0
    /home/boss/manager
}
I use sendmail with dovecot.

Thanks for help

Last edited by hua; 05-13-2012 at 07:36 AM.
 
Old 08-27-2012, 09:47 AM   #2
hua
Member
 
Registered: Oct 2006
Location: Slovak Republic
Distribution: Slackware 14.2, current
Posts: 461

Original Poster
Rep: Reputation: 78
I still cannot work this out. I already changed the local deliver to dovecots LDA and use SIEVE filters. The sieve filter works fine for other rules but not for this one which I need. I think there is something really important what I miss. I need to do this:

My users are whit mydomain.com:
user1@mydomain.com
user2@mydomain.com

External users are with externaldomain.com
user1@externaldomain.com
user2@externaldomain.com


With sieve filter I use the next script:
Quote:
# 2012-8-27
#
require "fileinto";
if header :contains ["from"] "user1@mydomain.com" {
fileinto "outbox-all";
}
As far as user1@mydomain.com sends email to (for example) user2@mydomain.com the SIEVE filter works.
But when user1@mydomain.com sends email to an external user user1@externaldomain.com it doesn't work.

I am trying to get over this problem long time and I tested procmail, maildrop, dovecots LDA. It looks like that all those delivery agents (procmail, maildrop, dovecot-lda) are working only if the email is processed as local-users email.
This means when the SMTP receives a message it decides weather the message is for a local-email-user or the message is forwarded to another SMTP server.
In this last case the MDA filters just doesn't work. I can see now that it is exactly how it should work. But it is possible to get this work some other way??

The problem is that the sent email is placed directly into a sent box by mail-user-agent and so it is not handled by the mail-delivery-agent again.

Last edited by hua; 08-27-2012 at 09:49 AM.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
sendmail email sending doesn't work correctly fabtk Linux - Software 5 08-29-2011 03:37 AM
Procmail doesn't work with alias? Possibly? Dan BadJar Linux - Software 0 07-07-2009 08:25 AM
how to truncate email (with procmail?) Bogus8 Linux - Software 11 07-22-2008 06:51 PM
Anyone Filter Email w/ Procmail carlosinfl Linux - Server 10 03-14-2008 03:07 PM
How to get procmail to send a copy of an email lmcilwain Linux - Software 0 03-02-2006 01:16 PM

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

All times are GMT -5. The time now is 03:00 AM.

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