Re: [exim] Is it possible to configure exim to receive email…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Ian Eiloart
Dátum:  
Címzett: Ariel Arelovich
CC: exim-users@exim.org
Tárgy: Re: [exim] Is it possible to configure exim to receive emails from printer and relay them through gmail?
Hi Ariel,

Exim listens on its own IP addresses. They can be any addresses that its host has. It can’t "listen for" traffic from specific addresses. However, you can achieve this effect in a number of ways.

1. If your mail server has no other job, you can use the host’s firewall to block inbound port 25 for other addresses.

2. Again, if your mail server has no other job, you can use an ACL like

accept hosts = 10.9.8.7
deny

Either way, you then need a redirect router to get the email delivered to the correct desination.


3. If you do have other jobs, then your ACL needs to identify the incoming email, then tag it in a way that the router above can test with a condition , perhaps by adding something like "acl_m_sender = printer" before the deny, then adding a router condition to look for that. And the simplest test to add to the router would be something like "require_files = /foo/$acl_m_sender" and ensuring that the file /foo/printer exists. Or you could say something like "condition = ${if $eq{{$acl_m_sender}{printer}}}"

I’ve not tested any of the above, so take with doses of salt.



> On 10 Sep 2015, at 12:46, Ariel Arelovich <aarelovich@???> wrote:
>
> Hello:
>
> I've work in an office with an old printer/scanner that refuses to
> send its scanned files using normal smtp means (like a gmail account
> configuration).
>
> I've manged to make it work, by configuring it to send the emails our
> server (which has Debian and Exim) and then use exim hubbedhosts file
> to relay these emails to our networked computers. However this last
> part is hard to port to other OS (will need to move our workstations,
> but not our server, to CentOS soon), or even make it work on Windows
> (our administrative personnel have windows computers). So I thought of
> configuring exim to receive the emails from the printer and then relay
> them to gmail. However most tutorials I found seemingly configure exim
> to use the user email to send it thorugh gmail.
>
> I followed this tutorial:
>
> https://wiki.debian.org/GmailAndExim4
>
> However in the line where it said
>
> Set to "127.0.0.1" for "IP-addresses to listen on for incoming SMTP
> connections" to refuse external connections.
>
> I changed it to 127.0.0,1;10.255.255.51 so that exim will accept my
> printers emails (that last IP is the printer address).
>
> However I allways get a:
>
> 2015-09-10 08:00:01 socket bind() to port 25 for address 10.255.255.51
> failed: Cannot assign requested address: waiting 30s before trying
> again (1 more try)
> 2015-09-10 08:00:10 socket bind() to port 25 for address 10.255.255.51
> failed: Cannot assign requested address: waiting 30s before trying
> again (6 more tries)
> 2015-09-10 08:00:31 socket bind() to port 25 for address 10.255.255.51
> failed: Cannot assign requested address: daemon abandoned
>
> In the /etc/var/exim4/mainlog.
>
> Is it possible to do what I want? Can anyone tell me how to do it?
>
> I might add that I'm very new at this, so I ask for patience please.
>
> Thanks in advance for any help.
>
> --
> ## List details at https://lists.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/


--
Ian Eiloart
Postmaster, University of Sussex
+44 (0) 1273 87-3148