Zentyal Forum, Linux Small Business Server

Zentyal Server => Installation and Upgrades => Topic started by: aspangilinan on September 19, 2011, 02:27:18 am

Title: [SOLVE] mail forwarding
Post by: aspangilinan on September 19, 2011, 02:27:18 am
Hi,

i use zentyal 2.0.3.

where i see config in mail forwarding.

thanks.
Arnel
Title: Re: mail forwarding
Post by: c4rdinal on September 19, 2011, 02:13:40 pm
I suppose you have to manually edit postfix config:

#vi /etc/postfix/virtual

#Forward email sent to vivek@yahoo.com to vivek@domain.com:
vivek@yahoo.com        vivek@domain.com

HTH
Title: Re: mail forwarding
Post by: aspangilinan on September 20, 2011, 05:30:48 pm
Hi c4rdinal,

sorry can't follow your instructions,

in /etc/postfix/ there's no virtual config.

can you please teach me, step by step.

Thanks.
Arnel


Title: Re: mail forwarding
Post by: aspangilinan on September 21, 2011, 02:32:12 pm
Hi Christian,

Do you have any update on mail forwarding or how manual config mail forwarding in zentyal,

i use zentyal 2.0.3 32bit.

Thanks for your response.

Thanks
Arnel
Title: Re: mail forwarding
Post by: christian on September 21, 2011, 02:38:57 pm
No I don't  :-[
Your question is too generic for me to provide any answer.
I believe reading Postfix documentation is the right way to proceed for you.
It may at least help you writing the right question or with the right scope and objective.
Title: Re: mail forwarding
Post by: aspangilinan on September 21, 2011, 02:46:05 pm
ok Thanks a lot. :-[

Title: Re: mail forwarding
Post by: andygraybeal on September 21, 2011, 05:23:57 pm
I think I'm trying to figure out the same thing.  I want an address on our Zentyal system to be able to be forwarded to a gmail or yahoo account.

I have found a handful of posts about this on the forum, this is the one that has my attention:
http://forum.zentyal.org/index.php/topic,956.msg3778.html#msg3778

Javi says to:
Quote
You can edit /usr/share/ebox/stubs/mail/main.cf.mas and /usr/share/ebox/stubs/mail/master.cf.mas.
Those are the templates that are used to generate the postfix configuration.

The only thing that you should take into account is that if you upgrade ebox-mail you will lose these changes.  Just keep a copy of those files, and it will be easy to merge back your changes when you upgrade eBox.

I wonder if this is helpful to you.  I need to implement this in my system too and I don't understand it yet.

I wonder if I take the line that c4rdinal wrote for the /etc/postfix/virtual file (I also don't have this):
Quote
#Forward email sent to vivek@yahoo.com to vivek@domain.com:
vivek@yahoo.com        vivek@domain.com

And put that into the template somewhere if this will work.

I just don't know enough ;)  I hope someone can spell it out.

-Andy

Title: [SOLVE] Re: mail forwarding
Post by: aspangilinan on September 22, 2011, 06:39:02 pm
Hi c4rdinal and all friends,

here's my main.cf config, where i put the virtual_alias_domain to active the mail forwarding.

when i try this not working  and i have also file virtual in /etc/postfix/virtual

internaldomain externaldomain

please help me.
thanks.

==================================================================
# Virtual Aliases
virtual_alias_domains = nsbengineering.com.ph
virtual_alias_maps = hash:/etc/postfix/virtual

#virtual_alias_maps = ldap:valiases
valiases_server_host = 127.0.0.1
valiases_search_base = ou=mailalias,ou=postfix,dc=zentyal,dc=nsb,dc=local
valiases_query_filter = (&(mail=%s)(objectClass=CourierMailAlias))
valiases_result_attribute = maildrop
aliases_bind = no
======================================================================




# require helo
smtpd_delay_reject  = yes
smtpd_helo_required = yes

strict_rfc821_envelopes = yes
disable_vrfy_command = yes

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

myorigin = /etc/mailname
myhostname = zentyal.nsb.local
mydestination = $myorigin,$myhostname,localhost,localhost.$mydomain
smtp_helo_name = zentyal.nsb.local
alias_maps = hash:/etc/aliases

alias_database = hash:/etc/aliases
local_recipient_maps = proxy:unix:passwd.byname $alias_maps

relayhost =

mynetworks = 127.0.0.0/8 192.168.10.230/32

message_size_limit = 0
mailbox_size_limit = 0
virtual_mailbox_limit = 0
recipient_delimiter = +
inet_interfaces = all

# Virtual Aliases
virtual_alias_maps = ldap:valiases
valiases_server_host = 127.0.0.1
valiases_search_base = ou=mailalias,ou=postfix,dc=zentyal,dc=nsb,dc=local
valiases_query_filter = (&(mail=%s)(objectClass=CourierMailAlias))
valiases_result_attribute = maildrop
aliases_bind = no

# Virtual Domains

dovecot_destination_recipient_limit = 1
virtual_transport = dovecot
#virtual_transport = virtual
virtual_mailbox_base = /var/vmail/
virtual_mailbox_maps= ldap:ldapvirtualmap

ldapvirtualmap_server_host = 127.0.0.1:389
ldapvirtualmap_bind = no
ldapvirtualmap_search_base = ou=Users,dc=zentyal,dc=nsb,dc=local
ldapvirtualmap_query_filter = (&(mail=%s)(!(quota=-1))(objectClass=CourierMailAccount))
ldapvirtualmap_result_attribute = mailbox

virtual_mailbox_domains = ldap:vmaildomains
vmaildomains_server_host = 127.0.0.1
vmaildomains_bind = no
vmaildomains_search_base =  ou=postfix,dc=zentyal,dc=nsb,dc=local
vmaildomains_query_filter = (|(&(objectclass=domain)(domainComponent=%s))(&(objectclass=CourierMailAlias)(mail=@%s)))
vmaildomains_result_attribute = dc, maildrop

virtual_minimum_uid = 100
virtual_uid_maps = static:107
virtual_gid_maps = static:113

## TLS/SSL
smtpd_use_tls = yes
smtpd_tls_note_starttls = yes
smtpd_tls_key_file  = /etc/postfix/sasl/postfix.pem
smtpd_tls_cert_file = /etc/postfix/sasl/postfix.pem
smtpd_tls_loglevel = 1

smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, check_helo_access pcre:/etc/pos$

#SASL authentication
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain =
broken_sasl_auth_clients = yes
smtpd_tls_auth_only = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_local_domain =  $myorigin
Title: Re: [SOLVE] mail forwarding
Post by: aspangilinan on September 25, 2011, 06:00:48 am
anyone update on this problem

mail forwarding in ldap

we use zentyal 2.0 32bit

thanks.
Title: Re: [SOLVE] mail forwarding
Post by: andygraybeal on September 25, 2011, 11:00:20 am
curios, why is it marked with [SOLVE] ?

Also, to clarify, are we talking about the same thing?   I want to be able for a user to forward the mail they receive from their zentyal account to bob@gmail.com.  Is this the same as you?

Andy
Title: Re: [SOLVE] mail forwarding
Post by: aspangilinan on September 25, 2011, 02:59:03 pm
curios, why is it marked with [SOLVE] ?  >>> maybe my problem will solve.

=====================================================================================================================================
Also, to clarify, are we talking about the same thing?   I want to be able for a user to forward the mail they receive from their zentyal account to bob@gmail.com.  Is this the same as you?
=====================================================================================================================================

yup same. do you have any solution for this topic.

Arnel
Title: Re: [SOLVE] mail forwarding
Post by: andygraybeal on September 25, 2011, 03:17:14 pm
no no, I hope someone can help with this issue also :)
Title: Re: [SOLVE] mail forwarding
Post by: aspangilinan on September 25, 2011, 04:02:32 pm
i wish, coming soon.
  :D;D ;D

thanks.
Title: Re: [SOLVE] mail forwarding
Post by: Remon on September 25, 2011, 05:08:30 pm
If you use the groupware solution (Zarafa) then you can make that a rule by the user.
Title: Re: [SOLVE] mail forwarding
Post by: jsalamero on September 29, 2011, 09:05:07 pm
Just go to Mail -> Virtual Domain -> External Aliases and create the alias there :P No need to edit files manually!
Title: Re: [SOLVE] mail forwarding
Post by: andygraybeal on September 30, 2011, 12:35:28 am
okay interesting.. i wish i could have put this together myself.. i will test in the next couple of days.
Title: Re: [SOLVE] mail forwarding
Post by: andygraybeal on September 30, 2011, 12:45:02 am
http://doc.zentyal.org/en/mail.html  <-- it's in the documentation too
Title: Re: [SOLVE] mail forwarding
Post by: andygraybeal on October 04, 2011, 04:36:51 pm
works grandiose.  thanks so many.

andy
Title: Re: [SOLVE] mail forwarding
Post by: aspangilinan on October 06, 2011, 03:45:07 am
i just share. it's works

> and mail forwarding.

See Roundcube's settings menu, then the last tab -- "Filters"


thanks thanks thanks for zentyal.

Title: Re: [SOLVE] mail forwarding
Post by: andygraybeal on October 11, 2011, 03:24:57 pm
okay, i found a caveat.  External Alias setup doesn't work if the alias name is the same as an internal account name.  I still want people to logon to use the system, but they want their mail somewhere else.

I will test aspangilinan's approach by setting the filter in Roundcube.
Title: Re: [SOLVE] mail forwarding
Post by: andygraybeal on October 11, 2011, 03:37:48 pm
okay, roundcube filters work.  yes!
Title: Re: [SOLVE] mail forwarding
Post by: aspangilinan on October 11, 2011, 05:12:43 pm
thanks for roundcube, thanks for zentyal, thanks for all support.

thanks.