Re: [exim] smtp email relay - some progress

Top Pagina
Delete this message
Reply to this message
Auteur: sam wun
Datum:  
CC: exim-users
Oude Onderwerpen: [exim] smtp email relay - added options allow open relay.
Onderwerp: Re: [exim] smtp email relay - some progress
sam wun wrote:

> sam wun wrote:
>
>> I have added added the following options in the configure file try to
>> accomplish an auth relay:
>> hostlist relay_hosts = 192.168.4.0/24
>>
>> acl_check_rcpt:
>> accept domains = +local_domains
>> accept hosts = +relay_hosts
>>
>> After restarted exim, the Mozilla mail client seems have completed
>> the send. But after a while back when I look at the exim/mainlog
>> file, I found this error:
>> 2004-10-20 09:18:08 1CK52K-000Dva-5G SMTP timeout while connected to
>> mx2.mail.yahoo.com [64.156.215.20] after initial connection:
>> Operation timed out
>>
> I found that when sending relayed email with this option, the sender
> (mozilla mail client) does not need the check-box of "Use name and
> password" checked. This is bad. so what might the way to setup smtp
> auth relay in Exim4?
>

Hi,

In addition to the above options, I also added the following AUTH lines
at the end of the exim configure file:

fixed_plain:
driver = plaintext
public_name = PLAIN
server_condition = ${if and {{eq{$2}{user}}{eq{$3}{pass}}}{yes}{no}}
server_set_id = $2

This time, the Mozilla mail client pop up a dialog box "Mail Server
Password Required", I typed in my password which is the same as I login
cyrus imap server, but authentication keep fail with the following error:

fixed_plain authenticator failed for ([192.168.9.1]) [192.168.9.1]: 535
Incorrect authentication data (set_id=sam.wun)

Thanks
Sam

> Thanks
> Sam
>
>> Thanks
>> Sam
>>
>> sam wun wrote:
>>
>>> Hi,
>>>
>>> The Exim server (version 4) is able to send email from local nework
>>> to external mail server, but when external client connect (login and
>>> authenticated with the user name) to this Exim server and try to use
>>> it to relay email to an external mail server, the Exim server does
>>> not allow email relay. I thought the following setup will redirect
>>> smtp authentication to cyrus lmtp:
>>> In ROUTER:
>>> localuser:
>>> driver = accept
>>> # check_local_user
>>> # local_part_suffix = +* : -*
>>> # local_part_suffix_optional
>>> transport = local_delivery_lmtp
>>> cannot_route_message = Wonderful - Unknown user
>>> In TRANSPORT:
>>> local_delivery_lmtp:
>>> driver = lmtp
>>> batch_max = 20
>>> socket = /var/spool/imap/public/lmtp
>>> timeout = 45s
>>> group = mail
>>> user = cyrus
>>>
>>>
>>> but apparently it does not, the message indicated there must be some
>>> other setup in the following codes:
>>>
>>> acl_check_rcpt:
>>> accept  hosts = :
>>> deny    message       = Restricted characters in address
>>>          domains       = +local_domains
>>>          local_parts   = ^[.] : ^.*[@%!/|]
>>>  deny    message       = Restricted characters in address
>>>          domains       = !+local_domains
>>>          local_parts   = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
>>>  accept  local_parts   = postmaster
>>>          domains       = +local_domains

>>>
>>>  require verify        = sender
>>>  accept  domains       = +local_domains
>>>          endpass
>>>          verify        = recipient

>>>
>>>  accept  domains       = +relay_to_domains
>>>          endpass
>>>          verify        = recipient
>>>  accept  hosts         = +relay_from_hosts
>>>  accept  authenticated = *
>>>  deny    message       = Wondeful - relay not permitted
>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>                            here is where it causes relaying denied.

>>>
>>> I don't use MySQL and LDAP, only login is authenticated thru
>>> cyrus-sasl2. So how can I setup smtp authentication to allow
>>> authenticated email relaying in this case?
>>> I have verified that the email client (mozilla) have the check-box
>>> of Use name and password checked and I have typed in the user name
>>> in the edit box as well.
>>>
>>> Thanks
>>> Sam
>>>
>>>
>>
>>
>
>