LinuxQuestions.org
Help answer threads with 0 replies.
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 08-14-2009, 05:14 AM   #1
guy_lux
LQ Newbie
 
Registered: Aug 2009
Posts: 4

Rep: Reputation: 0
Postfix Pipe ending, final delivery not performed !


Hi :-),

I have created a pipe into Postfix in order to send incoming/outgoing mails content into a Database (for a Webmail app). The Mail extraction and DB insertion part is (well) done within a Ruby script.
Here is the code in /etc/postfix/master.cf :

Code:
#At the beginning of the file
smtp      inet  n       -       -       -       -       smtpd
 -o content_filter=brindinfo_filter:
#......and at the bottom of the file :
brindinfo_filter unix -     n       n       -       -       pipe
 flags=hq user=guillaume argv=/usr/bin/ruby1.8 /home/guillaume/brindinfo/lib/mail_receiver.rb
At the beginning, it works fine : everything passing true Postfix is successfully inserted into the DB. But at the end of the ruby script, Postfix simply ends up and do not perform final delivery, so every outgoing mail is simply... lost !!
Here's the /var/log/mail.log after an outgoing mail (@ replaced with "at" to prevent spammers) :

Code:
Aug 14 12:00:24 r25640 postfix/smtpd[17525]: 765FD811B8: client=localhost.localdomain[127.0.0.1]
Aug 14 12:00:24 r25640 postfix/cleanup[17528]: 765FD811B8: message-id=<4a8535b86c903_4474..fdbe46b861c2@r25640.ovh.net.tmail>
Aug 14 12:00:24 r25640 postfix/qmgr[16510]: 765FD811B8: from=<contact_at_brindinfo.fr>, size=451, nrcpt=1 (queue active)
Aug 14 12:00:24 r25640 postfix/smtpd[17525]: disconnect from localhost.localdomain[127.0.0.1]
Aug 14 12:00:25 r25640 postfix/pipe[17529]: 765FD811B8: to=<guy_lux_at_gmail.com>, relay=brindinfo_filter, delay=0.53, delays=0.37/0/0/0.16, dsn=2.0.0, status=sent (delivered via brindinfo_filter service)
Aug 14 12:00:25 r25640 postfix/qmgr[16510]: 765FD811B8: removed
How can I make postfix to perform normal mail delivery after the ruby script has finished (always with exit status 0 : ok) ?!

Any Idea please ?!

Last edited by guy_lux; 08-14-2009 at 05:24 AM.
 
Old 08-14-2009, 06:13 AM   #2
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
Have you looked at this? Notice that in the sample filter, mail is explicitly resubmitted using the sendmail command.
 
Old 08-15-2009, 11:59 AM   #3
guy_lux
LQ Newbie
 
Registered: Aug 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Yes, thank you, but althought I took sometime to dig in that document, I can't get things to work properly. Basically, I'm a web and Ruby on Rails developer, and not a sys admin. It would be great if someone could give me a little help about how things works in postfix and particularly the filters functions.

Any help highly appreciated
 
  


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
Help With Postfix Delivery Failure carlosinfl Linux - Server 2 09-05-2008 04:36 PM
Postfix Maildir delivery. NaCo Linux - Server 3 02-01-2008 09:38 AM
Postfix and local delivery shawnbishop Linux - Software 20 10-28-2006 01:11 PM
postfix mail delivery berrance Linux - Networking 4 02-28-2005 06:46 AM

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

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