1 (edited by Gammelobst 2012-05-31 06:50:02)

Topic: How-to: iRedmail with optional per-user freemail-addresses and relay

Hello iRedMail-Users,

i installed iRedMail 0.8.0 with MySQL backend last week in a VM, which went smoothly from a Ubuntu 12.04 LTS mini iso.
I created several users for internal use (mostly logging emails) and my account for now. Internal mail runs perfect. Incoming mails are also working. I installed fetchmail and it runs fine but outgoing mail is still a problem for me.
As far as this forum and google brought me i added

smtp:[smtp.web.de]:587

to my account under mailbox.transport with PHPMyAdmin. This activated relaying sucessfully, but i think authentication is needed when i look into the logfie

May 29 23:44:42 mail postfix/smtp[1485]: 747E0C94D2: to=<me@mydomain>, relay=smtp.web.de[217.72.192.157]:25, delay=0.21, delays=0/0/0.15/0.05, dsn=5.0.0, status=bounced (host smtp.web.de[217.72.192.157] said: 530 Authentication required (in reply to MAIL FROM command)

i already tried the sasl-passwd.db in main.cf but it doesn't work. sad

Has someone found a solution for enabling authentication on per-user relaying?

Thanks in advance

Gammelobst

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: How-to: iRedmail with optional per-user freemail-addresses and relay

Hi again,

so while testing...

activating relaying with mailbox.transport entry also relays mails for me. With it i don't get any mail because it is relayed to my provider instead my mailbox, so i removed it.

Next one was

relayhost = [smtp.web.de]
smtp_fallback_relay = [smtp.web.de]
smtp_sasl_password_maps = hash:/etc/postfix/sasl-passwd
smtp_sasl_auth_enable = yes
smtp_sasl_security_options =

in main.cf

This ended in:

May 30 00:19:23 mail postfix/smtp[2144]: 64BE9C94D8: to=<someone@somewhere.net>, relay=smtp.web.de[217.72.192.157]:25, delay=0.55, delays=0/0.01/0.39/0.14, dsn=5.0.0, status=bounced (host smtp.web.de[217.72.192.157] said: 550-Requested action not taken: mailbox unavailable 550 Sender address is not allowed. (in reply to MAIL FROM command))

which makes me think i just need to rewrite my sender address for it to work.

I'll investigate this further...

thanks in advance for you help


cya

Gammelobst

3 (edited by Gammelobst 2012-05-31 06:44:27)

Re: How-to: iRedmail with optional per-user freemail-addresses and relay

Hi again,

after more investigation i need to say everything i wrote wasn't what i wanted, so here:

in main.cf we need

smtp_sasl_password_maps = hash:/etc/postfix/sasl-passwd
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noplaintext noanonymous
smtp_sender_dependent_authentication = yes
smtp_connection_cache_on_demand = no
sender_dependent_relayhost_maps = hash:/etc/postfix/sender_dependent
sender_canonical_maps = hash:/etc/postfix/sender_canonical
smtp_sasl_tls_security_options = noanonymous
smtp_tls_note_starttls_offer = yes
smtp_tls_security_level = may

in sender_dependent:

email@provider.org smtp.provider.org
...

in sender_canonical:

localmailadress@iredmail.local email@provider.org
...

in sasl-passwd:

email@provider.org username:password

then:

postmap /etc/postfix/sender_dependent
postmap /etc/postfix/sender_canonical
postmap /etc/postfix/sasl-passwd

and with the final:

/etc/init.d/postfix restart

we can relay mails for every user we want with sender address-rewrite over any provider-smtp we want.

then combine it with fetchmail like this and there is everything we need for a SOHO/Private Mail-Server.

have fun and feel free to post thanks and optimizations.

cya

Gammelobst

4

Re: How-to: iRedmail with optional per-user freemail-addresses and relay

Thanks for your sharing. smile