I have to domains (primary = domain1.com and secondary domain2.com) - I want like user to send and recive mail as user@domain2.com.
First step: I followed this how to:
Step 1- Virtual Domain Set-up:
Use the e-smith-manager, Configuration/Domains panel to set-up the virtual domain, domain1.com. Instructions are found in the user manual.
Step 2 - Create your user:
Use the e-smith-manager, User accounts panel to set-up the user fred. Instructions are found in the user manual.
Step 3 - Create a templates-custom fragment:
mkdir -p /etc/e-smith/templates-custom/var/qmail/control/virtualdomains
pico /etc/e-smith/templates-custom/var/qmail/control/virtualdomains/90aliases
In this 90aliases file enter all your virtual aliases in the form alias:username. In the example below info@domain1.com is to go to user fred.
info@domain1.com:fred
If you want all domain mail going into one account, enter your virtual alias in the form domain:username. In the example below domain1.com:fred sends all @domain1.com mail to user fred.
domain1.com:fred
If you want all domain mail going into one account, except for defined users, enter your virtual aliases in the form shown below. In the example below domain1.com:fred sends all @domain1.com mail to user fred except for jim and bob who get their mail directly..
domain1.com:fred
jim@domain1.com:jim
bob@domain1.com:bob
Step 4 - Save the file above and execute a email-update:
/sbin/e-smith/signal-event email-update
This recreates the file var/qmail/control/virtualdomains with the above alias entries preceeding the domain entries and restarts qmail.
Step 5 - Test the above virtual aliases:
Send an e-mail to info@domain1.com to test that it is received by the qmail server without error and reach the intended recipient (fred) mailbox.
Step 2I have installed the
E-mail Blocking contrib from dungog.net for hepling me determin whitch user is for domain1 and whitch user is for domain2.
Results:
1. From local host (user@domain1.com or user@domain2.com) to user1@domain2.com is working.
2. From user@yahoo.com or user@hotmail.com I recieve that error (550 relaying not allowed)
3. When I try to send an email with
www.domain2.com/webmail identity field is user@domain1.com and not user@domain2.com
PS: I have https enabled and IMAP or POP not enabled (for security reasons).[/b] (I do not try to connect with extern programs to my mail server).