Hi,

I have a Postfix 2.7 running on our LAN to relay mails from servers
and such stuff to our hosted email service.
We have a photocopier that can also scan to PDF and email the
resulting file. Unfortunately our email-provider does not like mails
above the size of 20mb, so large scans can't get through (yes, the
machine can split it into multiple mails, but it does so in the most
horrible way which simply does not work correctly). In order to make
it possible for my users to scan and actually get the result
regardless of filesize I have decided to just have my local postfix
pipe the emails from the photocopier through a script I've made that
will extract the attached PDF and put it into the users homedir on our
fileserver. I am however having some problems getting the postfix
config to work. I decided to just run an extra smtpd on a different
port and have all mails delivered to that port piped to my script. I
therefore added these lines to master.cf:

192.168.0.42:8025       inet    n       -       n       -       -       smtpd
  -o relay_transport=scan
  -o relayhost=
  -o relay_domains=dsl.dk

scan    unix    -       n       n       -       -       pipe
  flags=X user=root argv=/usr/local/bin/recieve_scan.py

What I was hoping this would do would be to accept mails for i.e.
a...@dsl.dk and pipe them through recieve_scan.py. Unfortunately it
just relays them to our email-provider instead. Can anybody help me
figure out why it does not work? Perhaps I should take a completely
different approach?

(Yes, I have completely stopped and started Postfix after adding the
above, and smtpd listens to port 8025)

-- 
Anders Bruun Olsen
It-ansvarlig
Det Danske Sprog- og Litteraturselskab
(Society for Danish Language and Literature)

Reply via email to