Re: Skip bouncing messages

2012-01-04 Thread rihad
On 01/04/2012 04:44 PM, Jeroen Geilman wrote: On 2012-01-04 12:01, rihad wrote: Hi, all. Can Postfix 2.8 be configured to skip generating bounce messages in case there was a problem delivering the message? Sometimes we need to send messages to our subscribers through phplist from a legitimate

Re: Skip bouncing messages

2012-01-04 Thread rihad
On 01/04/2012 03:29 PM, Robert Schetterer wrote: Am 04.01.2012 12:01, schrieb rihad: Hi, all. Can Postfix 2.8 be configured to skip generating bounce messages in case there was a problem delivering the message? Sometimes we need to send messages to our subscribers through phplist from a

Skip bouncing messages

2012-01-04 Thread rihad
Hi, all. Can Postfix 2.8 be configured to skip generating bounce messages in case there was a problem delivering the message? Sometimes we need to send messages to our subscribers through phplist from a legitimate address, and we aren't really interested in getting the bounces delivered to that

Re: run external command when new mail arrives

2009-10-22 Thread rihad
rihad wrote: Now that I've fixed table lookup following from Magnus' advice, all is working! # postmap -q ri...@example.com mysql:/etc/postfix/mysql-virtual.cf ri...@example.com,ri...@sms.example.com The query now looks like this: query = select coalesce(goto,email),replace(coa

Re: run external command when new mail arrives

2009-10-22 Thread rihad
Wietse Venema wrote: You forgot to test the virtual alias expansion. postmap -q u...@example.com mysql:/etc/postfix/mysql-virtual.cf Thus should produce the same result as a hash: table with: u...@example.comu...@example.com, u...@sms.example.com Ditto for the transport map.

Re: run external command when new mail arrives

2009-10-22 Thread rihad
Magnus Bäck wrote: On Wednesday, October 21, 2009 at 19:43 CEST, rihad wrote: OK here's how far I've gone: master.cf: smsnotif unix - n n - - pipe flags=DRhu user=vmail argv=/root/smsnotif ${recipient} /root/smsnotif: #!/bin/sh echo &q

Re: run external command when new mail arrives

2009-10-21 Thread rihad
rihad wrote: We have two maps: virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-maps.cf virtual_maps = mysql:/etc/postfix/mysql-virtual.cf /etc/postfix/mysql-virtual-maps.cf: user = postfix password = c00lpass dbname = mail table = users select_field = maildir where_field = email

Re: run external command when new mail arrives

2009-10-21 Thread rihad
Geert Hendrickx wrote: On Wed, Oct 21, 2009 at 06:52:21PM +0500, rihad wrote: Geert Hendrickx wrote: In your case (SMS notifications) however, I would keep things simple and not try to integrate it so tightly into the delivery process, but just fork your incoming mails to two transports

Re: run external command when new mail arrives

2009-10-21 Thread rihad
Geert Hendrickx wrote: On Wed, Oct 21, 2009 at 11:04:44AM +0500, rihad wrote: in the myprog shell script, after it has done its job, how to pass control to virtual(8)? Something like echo "OK virtual"? You're talking to a postfix newbie facing too close a deadline, plea

Re: run external command when new mail arrives

2009-10-20 Thread rihad
Geert Hendrickx wrote: On Wed, Oct 21, 2009 at 10:20:50AM +0500, rihad wrote: One more thing, please: after myprog has done its job, how can I pass the original message back to postfix so it does whatever should be done after myprog is finished (like delivering the message with virtual(8

Re: run external command when new mail arrives

2009-10-20 Thread rihad
Geert Hendrickx wrote: On Tue, Oct 20, 2009 at 10:57:58PM +0500, rihad wrote: could someone please say how I'd configure external program myprog instead of maildrop? Maybe something like: myprog unix - n n - - pipe user=vmail argv=/path/to/mypr

Re: run external command when new mail arrives

2009-10-20 Thread rihad
Geert Hendrickx wrote: On Tue, Oct 20, 2009 at 10:57:58PM +0500, rihad wrote: could someone please say how I'd configure external program myprog instead of maildrop? Maybe something like: myprog unix - n n - - pipe user=vmail argv=/path/to/mypr

Re: run external command when new mail arrives

2009-10-20 Thread rihad
Wietse Venema wrote: rihad: Aha, and then if I'd like the original executable to do its work, _without_ having read the body, will exec'ing it be enough? You MUST use one of Postfix's deliver programs in master.cf: local, virtual, pipe, smtp. The interface to the queue

Re: run external command when new mail arrives

2009-10-20 Thread rihad
Robert Schetterer wrote: Geert Hendrickx schrieb: On Tue, Oct 20, 2009 at 02:04:15PM +0500, rihad wrote: "The Postfix SMTP server has a number of built-in mechanisms to block or accept mail at specific SMTP protocol stages." But the mail could later be filtered etc., so it's

Re: run external command when new mail arrives

2009-10-20 Thread rihad
Wietse Venema wrote: rihad: Aha, and then if I'd like the original executable to do its work, _without_ having read the body, will exec'ing it be enough? You MUST use one of Postfix's deliver programs in master.cf: local, virtual, pipe, smtp. The interface to the queue

Re: run external command when new mail arrives

2009-10-20 Thread rihad
Wietse Venema wrote: rihad: Geert Hendrickx wrote: On Tue, Oct 20, 2009 at 02:04:15PM +0500, rihad wrote: "The Postfix SMTP server has a number of built-in mechanisms to block or accept mail at specific SMTP protocol stages." But the mail could later be filtered etc., so it's

Re: run external command when new mail arrives

2009-10-20 Thread rihad
Geert Hendrickx wrote: On Tue, Oct 20, 2009 at 02:04:15PM +0500, rihad wrote: "The Postfix SMTP server has a number of built-in mechanisms to block or accept mail at specific SMTP protocol stages." But the mail could later be filtered etc., so it's a bit early for the external

Re: run external command when new mail arrives

2009-10-20 Thread rihad
Geert Hendrickx wrote: On Tue, Oct 20, 2009 at 01:03:04PM +0500, rihad wrote: Hi there, I need an external command to be run whenever new mail is finally delivered to a virtual domain, but I don't need access to the body of that mail, only who it is for (from its headers). Just wonderi

Re: run external command when new mail arrives

2009-10-20 Thread rihad
Geert Hendrickx wrote: On Tue, Oct 20, 2009 at 01:03:04PM +0500, rihad wrote: Hi there, I need an external command to be run whenever new mail is finally delivered to a virtual domain, but I don't need access to the body of that mail, only who it is for (from its headers). Just wonderi

run external command when new mail arrives

2009-10-20 Thread rihad
Hi there, I need an external command to be run whenever new mail is finally delivered to a virtual domain, but I don't need access to the body of that mail, only who it is for (from its headers). Just wondering if content filtering is the most efficient way supported by Postfix to do that: http://

Re: virtual_mailbox_maps w/out massive tables?

2008-09-24 Thread rihad
mouss wrote: rihad wrote: This is probably a faq, but still... I've been playing with virtual delivery: main.cf: virtual_mailbox_domains = bar.com virtual_mailbox_base = /home/massmail virtual_mailbox_maps = regexp:/usr/local/etc/postfix/home.map virtual_minimum_uid = 1002 virtual_uid

virtual_mailbox_maps w/out massive tables?

2008-09-23 Thread rihad
_maps = static:1002 home.map: /^(.+)@([EMAIL PROTECTED])$/$2/$1/ [EMAIL PROTECTED]:~$ telnet nigar smtp Trying 192.168.0.248... Connected to nigar.localnet. Escape character is '^]'. 220 nigar.localnet ESMTP Postfix mail from: rihad 250 2.1.0 Ok rcpt to: [EMAIL PROTECTED] 250 2.

Re: storing mydestination in mysql

2008-09-17 Thread rihad
rihad wrote: Victor Sorry again, I meant Viktor.

Re: storing mydestination in mysql

2008-09-17 Thread rihad
mouss wrote: rihad wrote: Victor Duchovni wrote: If you want the fewest possible lookups against $mydestination, get $mydestination out of $relay_domains (backwards compatible, but no longer optimal default). relay_domains was and is empty (please see one of my last replies to mouss

Re: storing mydestination in mysql

2008-09-17 Thread rihad
Victor Duchovni wrote: On Wed, Sep 17, 2008 at 10:09:53PM +0500, rihad wrote: Correcting myself once again: It's not OK :) I forgot to mention that all those 4 requests were the result of me issuing RCPT TO alone. I can't see how message acceptance or routing are involved. You a

Domain name appended despite remote_header_rewrite_domain being empty

2008-09-17 Thread rihad
Hi there, I'm a Postfix newb playing my way with FreeBSD 7 port named postfix-current-2.6.20080814,4. In http://www.postfix.org/ADDRESS_REWRITING_README.html it says that: Postfix never rewrites message header addresses from remote SMTP clients when the remote_header_rewrite_domain parameter v

Re: storing mydestination in mysql

2008-09-17 Thread rihad
rihad wrote: mouss wrote: Also set parent_domain_matches_subdomains = (empty) Then retry to see how many lookups there are. [snip] But it's different processes doing the queries (one to accept the message, one to route the message to the local delivery agent, ...). Oh, in that

Re: storing mydestination in mysql

2008-09-17 Thread rihad
Victor Duchovni wrote: On Wed, Sep 17, 2008 at 08:51:48PM +0500, rihad wrote: Sure enough, but I'm speaking of a single snapshotted value through a single request ("transaction"). Besides its being more efficient, caching makes for more consistent results: you wouldn't wa

Re: storing mydestination in mysql

2008-09-17 Thread rihad
mouss wrote: rihad wrote: rihad wrote: What's going on? How is Postfix supposed to learn the whole mydestination list if there's no such SQL template? I thought Postfix would deduce a "select k from mydestination" query or similar on its own. The manpage is ambi

Re: storing mydestination in mysql

2008-09-17 Thread rihad
rihad wrote: What's going on? How is Postfix supposed to learn the whole mydestination list if there's no such SQL template? I thought Postfix would deduce a "select k from mydestination" query or similar on its own. The manpage is ambiguous in this regard. Answering to

Re: storing mydestination in mysql

2008-09-17 Thread rihad
mouss wrote: rihad wrote: query = SELECT v FROM mydestination WHERE k='%s' - do not return NULL. since the result is unused, simply use query = SELECT 'blah' mydestination WHERE k='%s' Sorry, but your suggested fix doesn't solve the problem: the

Re: storing mydestination in mysql

2008-09-16 Thread rihad
Correction: /usr/local/etc/postfix/main.cf: mydestination = mysql:/usr/local/etc/postfix/mysql-mydestination.conf /user/local/etc/postfix/mysql-mydestination.conf: host = localhost username = postfix password = none dbname = mail expansion_limit = 1 query = SELECT v FROM mydestination WHERE k='

storing mydestination in mysql

2008-09-16 Thread rihad
Hi there, I'm a Postfix newb playing with Postfix-current under FreeBSD and am now trying to store mydestination in mysql: /usr/local/etc/postfix/main.cf: mydestination = mysql:/usr/local/etc/postfix/mysql-mydestination.conf /user/local/etc/postfix/mysql-mydestination.conf: host = localhost use