[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

04/03/2008 at 08:38AM PDT, ID: 23293166
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.4

Help needed with virtual users / local relaying in postifx + dovecot

Asked by Havin_it in Email Servers, Simple Mail Transfer Protocol (SMTP), Linux

Tags: postfix, 2.5.1

Hello,

I've set up a simple mailserver on Gentoo Linux which uses the following components:

- fetchmail to receive from various POP3 accounts on the Internet
- dovecot-1.1_rc4 to deliver (using its own LDA and virtual users) and serve mail by IMAP
- postfix to route outgoing mail from the IMAP clients to my ISP's SMTP server (clients authenticate to postfix using dovecot-sasl; postfix uses cyrus-sasl to auth with the ISP server)

All is working well so far, but I want to make an addition. I want mail sent from one of the local accounts (whose "From:" address will be that of the external POP3 address) to one of the others (again, "to:" being the external address) to be routed directly back to LDA to the appropriate local mailbox instead of going out via the Internet and coming back.

My additional hope is that if I can make this work, I can also allow local daemons to send log/alert emails to one of these addresses.

I have had a stab at it, using the howto on dovecot's wiki, but with what I have currently, the emails I send are getting bounced with a "unknown user" message.

I've added the postfix and dovecot configs in the code-listing below. Hope it's clear enough; please let me know any other stuff you might need to see.

Hope somebody can help!
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
# section from /etc/postfix/main.cf
dovecot   unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${recipient}
 
--------------------------
# /etc/postfix/main.cf
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
myhostname = brazil
mydomain = localdomain
dovecot_destination_recipient_limit = 1
virtual_mailbox_domains = popaccount1.net, popaccount2.co.uk
virtual_transport = dovecot
virtual_mailbox_maps = hash:/etc/postfix/virtual
unknown_local_recipient_reject_code = 550
mynetworks = 192.168.2.0/28, 192.168.10.0/28, 127.0.0.0/8
relayhost = [post.demon.co.uk]
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/saslpass
smtp_sasl_security_options =
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
debug_peer_level = 2
debugger_command =
         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
         ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = postdrop
html_directory = /usr/share/doc/postfix-2.5.1/html
manpage_directory = /usr/share/man
sample_directory = /etc/postfix
readme_directory = /usr/share/doc/postfix-2.5.1/readme
home_mailbox = .maildir/
 
# NB - pop3 domains changed for anonymity. 'brazil' is the machine's hostname but it has no FQDN.
 
--------------------------------------------
# /etc/dovecot/dovecot.conf
 
disable_plaintext_auth = no
log_path = /var/log/dovecot.log
info_log_path = /var/log/dovecot-info.log
ssl_disable = yes
ssl_cert_file = /etc/ssl/dovecot/server.pem
ssl_key_file = /etc/ssl/dovecot/server.key
mail_location = maildir:~/.maildir
dotlock_use_excl = yes
maildir_copy_with_hardlinks = yes
protocol imap {
}
protocol pop3 {
}
protocol managesieve {
  sieve=~/.dovecot.sieve
  sieve_storage=~/sieve
}
protocol lda {
  postmaster_address = postmaster@example.com
  mail_plugins = cmusieve
  mail_plugin_dir = /usr/lib/dovecot/lda
  sieve_global_path = /home/vmail/sieve
}
auth default {
  mechanisms = plain
  socket listen {
    master {
      path = /var/run/dovecot/auth-master
      mode = 0600
      user = vmail # User running deliver
    }
    client {
      path = /var/spool/postfix/private/auth
      mode = 0660
      user = postfix
      group = postfix
    }
  }
  passdb passwd-file {
    args = /etc/dovecot/passwd
  }
  userdb static {
    args = uid=vmail gid=vmail home=/home/vmail/%u
  }
  user = root
}
dict {
}
plugin {
}
[+][-]04/03/08 10:50 PM, ID: 21279310

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/04/08 04:45 AM, ID: 21280591

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/04/08 05:09 AM, ID: 21280769

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/04/08 09:19 AM, ID: 21283256

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/05/08 01:58 AM, ID: 21287502

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/05/08 04:41 AM, ID: 21287808

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/05/08 05:49 AM, ID: 21287938

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/05/08 06:30 AM, ID: 21288105

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/05/08 07:46 AM, ID: 21288313

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/05/08 09:42 AM, ID: 21288722

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/06/08 04:46 AM, ID: 21291477

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/06/08 06:02 AM, ID: 21291635

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/06/08 08:46 AM, ID: 21292148

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/07/08 01:32 PM, ID: 21300311

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Email Servers, Simple Mail Transfer Protocol (SMTP), Linux
Tags: postfix, 2.5.1
Sign Up Now!
Solution Provided By: Havin_it
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20091111-EE-VQP-91 / EE_QW_2_20070628