2

I'm using Apache, Postfix, Courier IMAP and roundcube on my CentOS 7 machine.

I would like to create a new user account / new user email to be able to send emails from my domain outside my local network (to the internet).

I crated a user named "bbrown" on my CentOS server (just an ordinary Linux account, adduser/useradd bbrown). I then go to the roundcube mail webpage, I canot log in as "bbrown" or as "[email protected]".

If I putty to the CentOS server, I can log in as "bbrown" into the command line. Whatever is supposed to automatically create a roundcube mail user account in the database is not creating it. (I made sure the setting for auto_create_user is set to true in the ./config/main.inc.php: $rcmail_config['auto_create_user'] = TRUE;)

This is a standalone CentOS server so the user is being added by the useradd command on the command line. This is not CPANEL or any other type of Linux server. Everything in this forum seems to indicate that most people add users using CPANEL which may be doing something different than the generic useradd script.

My guess is that I probably need to add an account to my IMAP server - but really don't know how to do this. I checked logs, I have there such message:

imapd: bbrown: No such file or directory

What else should I check / do to make it work?

POSTFIX CONFIG FILE:

inet_interfaces = x.x.x.x, 192.168.1.1, 127.0.0.1, [::1]
inet_protocols  = ipv4, ipv6
mydomain   = xxxx.xxxx.xx
myhostname = xxxx.$mydomain
myorigin = $myhostname
mydestination = $myhostname, localhost.$mydomain, localhost
mynetworks = 127.0.0.0/8, [::1]/128 
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
biff = no 
mailbox_command = /usr/bin/maildrop
home_mailbox = Maildir/
message_size_limit = 30720000
recipient_delimiter = +
relay_domains = $mydestination
relay_recipient_maps =
relay_transport = relay
relayhost =
smtpd_sasl_type = cyrus
smtpd_sasl_path = smtpd
smtpd_sasl_auth_enable   = yes
broken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymous
strict_rfc821_envelopes = yes
smtpd_client_restrictions =
# reject_unknown_client_hostname,
 permit

smtpd_helo_restrictions =
 reject_invalid_helo_hostname,
# reject_non_fqdn_helo_hostname,
# reject_unknown_helo_hostname,
 permit

smtpd_sender_restrictions =
 reject_unknown_sender_domain,
 hash:/etc/postfix/sender_checks,
 reject_non_fqdn_sender,
 permit

smtpd_recipient_restrictions =
 reject_non_fqdn_recipient,
# if sasl_authenticated, then permit (end here)
 permit_sasl_authenticated,
# if not sasl_authenticated, then check auth_destination
 permit_auth_destination,
# if not auth_destination, then reject
 reject


smtpd_etrn_restrictions =
 permit_mynetworks,
 reject

smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_security_level = may
smtpd_tls_cert_file = /etc/ss-certs/xxxx-smtp-crt-04032015.pem
smtpd_tls_key_file  = /etc/ss-certs/xxxx-smtp-key-04032015.pem
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_loglevel = 1
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
receive_override_options = no_address_mappings
content_filter=smtp-amavis:[127.0.0.1]:10024

imapd-ssl

SSLPORT=993
SSLADDRESS=0
SSLPIDFILE=/var/run/courier/imapd-ssl.pid
SSLLOGGEROPTS="-name=imapd-ssl"
IMAPDSSLSTART=YES
IMAPDSTARTTLS=YES
IMAP_TLS_REQUIRED=0
COURIERTLS=/usr/bin/couriertls
TLS_KX_LIST=ALL
TLS_COMPRESSION=ALL
TLS_CERTS=X509
TLS_CERTFILE=/etc/courier/imapd.pem
TLS_TRUSTCERTS=/etc/ssl/certs
TLS_VERIFYPEER=NONE
TLS_CACHEFILE=/var/lib/courier/couriersslcache
TLS_CACHESIZE=524288
MAILDIRPATH=Maildir

authdaemonrc

authmodulelist="authpam"

authmodulelistorig="authuserdb authpam authpgsql authldap authmysql authcustom authpipe"

daemons=5

authdaemonvar=/var/run/courier/authdaemon

DEBUG_LOGIN=0

DEFAULTOPTIONS=""

LOGGEROPTS=""

When I try to authenticate using my old account (authtest brib):

Authentication succeeded.

     Authenticated: brib  (system username: brib)
    Home Directory: /home/brib
           Maildir: (none)
             Quota: (none)
Encrypted Password: $6$UtexL35q$9sM9PIkS7FD6UzVdPPjwjr3/Ee.RxGkRD6SLgeThXS.HC9dMAuJMT8NwjaYpLlW2jDCDQBWOv5lAp9OClhfMA.
Cleartext Password: (none)
           Options: (none)

However, with the new one I got (authtest bbrown):

Authentication FAILED: Operation not permitted
5
  • 1
    Please post your courier configuration. Also note that useradd is a low-level utility and adduser is the friendly frontend, which also sets up all directories and permissions accordingly.
    – sebix
    May 3, 2015 at 9:59
  • @sebix: where can I find this config file? May 4, 2015 at 10:05
  • When you get error Authentication FAILED: Operation not permitted, did anything logged in courier logs?
    – masegaloeh
    May 4, 2015 at 14:24
  • 2
    Try turning up the debug level on authdaemon - see courier-mta.org/authlib/README.authdebug.html for details of how to do this. May 5, 2015 at 15:07
  • Have you tried creating the "maildir" ? SSH as the user, and run mkdir ~/Maildir then try connecting via IMAP again.
    – user186340
    May 6, 2015 at 21:16

2 Answers 2

2

imapd expects the mail folder to exist

mkdir -p ~bbrown/Maildir/{cur,new,tmp}
chown -R bbrown:bbrown ~bbrown/Maildir
0

You don't appear to have attempted to send anything to the user (which would reasonably cause the mail server to create the mailbox).

I would suggest you mail that user something first.

eg. mail -s test_1 bbrown <<< this_is_a_test

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .