On 24.06.22 20:17, Luc GMail wrote:
Hi. I am trying to achieve this, to have a catch-all receiver that will pipe all mail through a script. I've been searching and trying possible solutions, and the one I've found that seems closest to doing the job is this one:
you can do this in recipients .forward, .procmailrc or .mailfilter, is there any reason you want to do this in postfix configuration file?
---------------- 8< ---------------- useradd -m -s /bin/false mailbot && echo "mailbot:somepass" | chpasswd mkdir /home/mailbot/Mail chown mailbot:mailbot /home/mailbot/Mail chmod -R 700 /home/mailbot/Mail echo '@example.com mailbot' > /etc/postfix/virtual postmap /etc/postfix/virtual echo 'virtual_alias_maps = hash:/etc/postfix/virtual' >> /etc/postfix/ main.cf echo 'transport_maps = hash:/etc/postfix/transport' >> /etc/postfix/main.cf echo 'mail...@example.com mailbot:' > /etc/postfix/transport postmap /etc/postfix/transport echo 'mailbot unix - n n - 50 pipe' >> master.cf echo 'flags=R user=dropbox argv=/etc/postfix/script.sh -o SENDER=${sender} -m USER=${user} EXTENSION=${extension}' >> master.cf postfix reload ---------------- >8 ---------------- Not close enough though. I am getting these errors in the log: server postfix/qmgr[22581]: warning: connect to transport private/mailbot: Connection refused server postfix/error[22610]: 5F4D032ACB: to=<mail...@example.com>, orig_to=< nonexist...@example.com>, relay=none, delay=0.13, delays=0.07/0.02/0/0.03, dsn=4.3.0, status=deferred (mail transport unavailable) What am I doing wrong, please?
-- Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/ Warning: I wish NOT to receive e-mail advertising to this address. Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu. Silvester Stallone: Father of the RISC concept.