LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-02-2006, 02:33 PM   #1
Child of Wonder
Member
 
Registered: Jul 2004
Location: Sioux Falls, SD
Distribution: Debian, Ubuntu, Fedora, Red Hat
Posts: 69

Rep: Reputation: 16
Help with Postfix virtual mailboxes + Courier POP3


I'm trying to set up my Ubuntu server for virtual mailboxes since I'll eventually be hosting a few domains on it. So far, only one domain will be running through it but more will be added as time goes by.

So far I have things set up properly for Postfix and mail is being delivered to the correct mailbox.

Here's my main.cf:

Code:
## General Settings
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
append_dot_mydomain = no
myhostname = mail.sassefamily.com
mydomain = sassefamily.com
myorigin = sassefamily.com
mynetworks = 192.168.0.0/24
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
inet_interfaces = all
mydestination =
#relayhost = smtp.midco.net
#delay_warning_time = 4h

## Virtual Alias domains
#virtual_alias_domains = sassefamily.com
#virtual_alias_maps = hash:/etc/postfix/virtual_alias_map

## Virtual Mailboxes
virtual_mailbox_domains = sassefamily.com
virtual_uid_maps = hash:/etc/postfix/virtual_uid_map
virtual_gid_maps = $virtual_uid_maps
virtual_mailbox_base = /var/spool/virtual_mailboxes
virtual_mailbox_maps = hash:/etc/postfix/virtual_mailbox_recipients
virtual_mailbox_aliases = hash:/etc/postfix/vitual_mailbox_alaises

## Mailbox options
mailbox_command =
mailbox_size_limit = 0
recipient_delimiter = +
smtpd_helo_required = yes
#home_mailbox = Maildir/

## SASL Auth and TLS
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

## Spam and other mail blocking options

smtpd_helo_required = yes

smtpd_client_restrictions =
        reject_rbl_client sbl-xbl.spamhaus.org
        reject_rbl_client relays.ordb.org
        reject_unauth_pipelining

smtpd_helo_restrictions =
        check_helo_access hash:/etc/postfix/helo_access
        reject_invalid_hostname
        reject_non_fqdn_hostname

smtpd_sender_restrictions =
        reject_non_fqdn_sender
        reject_unknown_sender_domain
        reject_rhsbl_sender sbl-xbl.spamhaus.org
        permit_mynetworks

smtpd_recipient_restrictions =
        permit_mynetworks
        permit_sasl_authenticated
        reject_unlisted_recipient
        reject_unauth_destination
        reject_non_fqdn_recipient
        reject_unauth_destination
        reject_unknown_recipient_domain
        check_policy_service inet:127.0.0.1:60000

smtpd_data_restrictions =
        reject_unauth_pipelining
        permit
However, I have two questions:

I'm assuming when my users set up their email client, they will now be using their entire email address for their username, however since they will no longer be accessing mail via a Linux username, how do I configure a password for them?

Also, how do I point Courier POP3d to the correct mail directories?

Thanks for the help.
 
Old 08-04-2006, 01:30 AM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Quote:
Originally Posted by Child of Wonder
I'm trying to set up my Ubuntu server for virtual mailboxes since I'll eventually be hosting a few domains on it. So far, only one domain will be running through it but more will be added as time goes by.

So far I have things set up properly for Postfix and mail is being delivered to the correct mailbox.

Here's my main.cf:
[SNIP]
However, I have two questions:

I'm assuming when my users set up their email client, they will now be using their entire email address for their username, however since they will no longer be accessing mail via a Linux username, how do I configure a password for them?

Also, how do I point Courier POP3d to the correct mail directories?

Thanks for the help.
This is a courier question more than a postfix or even a mailserver question. The auth protocol you chose courier to use (in the courier/authdaemonrc or authdaemon.conf file IIRC) will typically end up using the system's passwords. Because these are virtual users, it will probably authenticate a mysql database table, unless I'm missing your question entirely...

The other part is also to do with courier. In your courier/pop3d file you define the path to the users mailbox. In mine, here is the snippet:
Code:
##NAME: MAILDIRPATH:0
#
# MAILDIRPATH - directory name of the maildir directory.
#
MAILDIRPATH=Maildir

#Hardwire a value for ${MAILDIR}
MAILDIR=Maildir
MAILDIRPATH=Maildir
#Put any program for ${PRERUN} here
PRERUN=
It's at the very end of the file. I realize these are virtual users, but they should still have a Maildir defined in their mail table. Check out postfixadmin for more info on 'admin'ing virtual posftix:
http://www.postfixadmin.com (redirects you to high5's site).

Cool
 
Old 08-04-2006, 07:44 AM   #3
Child of Wonder
Member
 
Registered: Jul 2004
Location: Sioux Falls, SD
Distribution: Debian, Ubuntu, Fedora, Red Hat
Posts: 69

Original Poster
Rep: Reputation: 16
Thanks for your response.

Last night I found a guide on how to make this work with Dovecot and an htaccess file and now it works like a charm.

However, I'm going to attempt to switch it to a Courier and MySQL system since that will be more secure.

Thanks for your help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Courier-imap and Postfix Virtual Mailbox Domains ahSyd Slackware 0 05-26-2006 07:04 AM
How to create users to POSTFIX/Courier POP3 amfony Linux - Newbie 4 05-23-2006 09:38 AM
mail filtering with Postfix and virtual mailboxes pembo13 Linux - Networking 2 09-17-2004 07:09 AM
Postfix+Courier-IMAP virtual user not found when sending mail hawkpaul Linux - Software 0 05-03-2004 11:02 AM
SMTP/ Postfix / IMAP-POP3 / Courier ?? vladimir-dk Linux - Software 3 04-09-2004 04:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration