any help with email?

-j0

Verified User
Joined
Nov 23, 2010
Messages
23
Hello,

Kindly is there anyone in DirectAdmin support could assist me with setup Email smtp/pop3 in our FreeBSD 7 i368.

I had more than 2 weeks looking around and try to configure exim/postfix/courier/ssmtp... etc... and my head cannot conitnue in this Issue!

please let me know ASAP how could DirectAdmin support assist me with this issue, as my license is belong to my webserver provider; and my plan without any support from them, so am looking for DA support.

please shot a pm if you can support us with our FreeBSD server.

kind Regards,
-j0
 
i cannot remember how many smtps i did install in the server, and what is running and what not running, i install dovecot; then i think i delete it, then install exim again; then stop it; then install Courier; then postfix!

i just need to use a SSL connection between DA emails and my Thunderbird man!

sorry but i'am so tired of this issue, i would like to have any expert from DA to fix this issue for me please.
 
Just post in the employment section if you want to hire someone to administer your server. You obviously dont know what you are doing if you are installing courier and other mtas.
 
I know that am installing without know what am doing but i think i would like to try again and again till i learn dear, that's my point :).

I need the DirectAdmin support; or anyone to pm me; just a certified from DA and have experience in FreeBSD system.

Kind Regards,
-j0
 
It is enabled be default, I mean SSL connection with STMP/IMAP/POP3 with Exim/Dovecot under Directadmin.
 
I think i miss with the systems alot by installing/reinstalling;

Does DA support provide this for us; or should i reformat the system again and install a clean DA?

and please provide me a link for Exim/Dovecot SSL with DA under FreeBSD.

Regards,
j0
 
If you reinstalled Exim/Dovecot and it's running ok. Everything should work fine:

Code:
# netstat -an | grep LISTEN
tcp        0      0 0.0.0.0:993                 0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:995                 0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:587                 0.0.0.0:*                   LISTEN
....

# lsof -i:993
COMMAND     PID    USER   FD   TYPE     DEVICE SIZE NODE NAME
imap-logi   927 dovecot    5u  IPv4 1117071110       TCP *:imaps (LISTEN)
imap-logi  2092 dovecot    5u  IPv4 1117071110       TCP *:imaps (LISTEN)
dovecot    7221    root    8u  IPv4 1117071110       TCP *:imaps (LISTEN)
...
# lsof -i:995
COMMAND     PID    USER   FD   TYPE     DEVICE SIZE NODE NAME
pop3-logi  2301 dovecot    5u  IPv4 1117071112       TCP *:pop3s (LISTEN)
pop3-logi  2309 dovecot    5u  IPv4 1117071112       TCP *:pop3s (LISTEN)
pop3-logi  2380 dovecot    5u  IPv4 1117071112       TCP *:pop3s (LISTEN)

SSL with Exim is using 25 or 587 port, if I'm not mistaken.
 
Please note the self-signed certs in the current version of directadmin are using 9999 days which on 32 bit systems creates an already expired cert.

You will have to regen the certs:

Code:
#########################
SSL for port 2223 access
#########################
/usr/bin/openssl req -x509 -newkey rsa:1024 -keyout /usr/local/directadmin/conf/cakey.pem -out /usr/local/directadmin/conf/cacert.pem -days 9000 -nodes -subj "/C=<country>/ST=<state>/L=<locality>/O=<organization>/OU=<department>/CN=<hostname>"
chown diradmin:diradmin /usr/local/directadmin/conf/cakey.pem
chmod 400 /usr/local/directadmin/conf/cakey.pem

edit /usr/local/directadmin/conf/directadmin.conf
add line: ssl_port=2223

service directadmin restart
//test using browser to verify cert is valid: https://$hostname:2223

#########################
SSL for exim
#########################
/usr/bin/openssl req -x509 -newkey rsa:1024 -keyout /etc/exim.key -out /etc/exim.cert -days 9000 -nodes -subj "/C=<country>/ST=<state>/L=<locality>/O=<organization>/OU=<department>/CN=<hostname>"
chown mail:mail /etc/exim.key
chmod 600 /etc/exim.key
chmod 644 /etc/exim.cert
service exim restart

//test using: openssl s_client -starttls smtp -connect $hostname:25
//ensure you see “Verify return code: 18 (self signed certificate)” and not “Verify return code: 10 (certificate has expired)”

#########################
SSL for the server
#########################
/usr/bin/openssl req -x509 -newkey rsa:1024 -keyout /etc/httpd/conf/ssl.key/server.key -out /etc/httpd/conf/ssl.crt/server.crt -days 9000 -nodes -subj "/C=<country>/ST=<state>/L=<locality>/O=<organization>/OU=<department>/CN=<hostname>"
service httpd restart
service directadmin restart

//test using browser to verify cert is valid: https://$hostname

make sure you edit the values inside the -subj string to match your server
 
Hi,

Kindly let me know what the best deliveries system works with DA, as i need to know if i install PostFix with SASL and Exim is that okay?

sorry fir this n00b question, but i'am learning how-to administrator freebsd with DA.

-j0
 
By default directadmin does not support Postfix. If you want it, you can try it yourself without any guarantee on success.
 
Okay i remove postfix;courier; and install Dovecot 1.2.16 with exim and working fine; but when i use Thunderbird now it's show me this error in

Code:
tail -F /var/log/maillog

Code:
Jan 11 13:38:21 j0 dovecot[35978]: dovecot: Killed with signal 15 (by pid=0 uid=0 code=)
Jan 11 13:38:22 j0 dovecot[36062]: Dovecot v1.2.16 starting up
Jan 11 13:38:38 j0 dovecot[36062]: pop3-login: Aborted login (no auth attempts): rip=9myipaddress, lip=serveripaddress
Jan 11 13:38:38 j0 dovecot[36062]: imap-login: Aborted login (no auth attempts): rip=9myipaddress, lip=serveripaddress
Jan 11 13:38:38 j0 last message repeated 2 times
Jan 11 13:38:38 j0 dovecot[36062]: pop3-login: Aborted login (no auth attempts): rip=9myipaddress, lip=serveripaddress
Jan 11 13:38:38 j0 dovecot[36062]: imap-login: Aborted login (no auth attempts): rip=9myipaddress, lip=serveripaddress
Jan 11 13:38:38 j0 dovecot[36062]: pop3-login: Aborted login (no auth attempts): rip=9myipaddress, lip=serveripaddress

I did disable the SSL to test the imap with Dovecot and then i will generate a new Cert for Dovecot. and here is my dovecot -n configurations:
Code:
j0# dovecot -n
# 1.2.16: /etc/dovecot.conf
# OS: FreeBSD 7.3-RELEASE-p2 i386
protocols: imap pop3
ssl_cert_file: /etc/httpd/conf/ssl.crt/server.crt
ssl_key_file: /etc/httpd/conf/ssl.key/server.key
ssl_cipher_list: HIGH:MEDIUM:+TLSv1:!SSLv2:+SSLv3
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
login_user: dovenull
login_greeting: Dovecot DA ready.
login_processes_count: 16
verbose_proctitle: yes
mail_access_groups: mail
mail_location: maildir:~/Maildir
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_plugin_dir(default): /usr/lib/dovecot/imap
mail_plugin_dir(imap): /usr/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
auth default:
  username_chars: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@&
  verbose: yes
  passdb:
    driver: passwd
  passdb:
    driver: passwd-file
    args: username_format=%n /etc/virtual/%d/passwd
  userdb:
    driver: passwd
  userdb:
    driver: passwd-file
    args: username_format=%n /etc/virtual/%d/passwd
j0#

any advice please? ( i need to use a non-secure imaps/pop3s for now; and when everything is completed i will generate a new cert for that.

Kind Regards,
-j0
 
and here is my rc.conf file;

Code:
sshd_enable="YES"
#sendmail_enable="NO"
#sendmail_flags="-bd -q30m"
#sendmail_submit_enable="NO"
#sendmail_outbound_enable="NO"
#sendmail_msp_queue_enable="NO"
#spamd_enable="YES"
#postfix_enable="YES"
#saslauthd_enable="YES"

#courier_authdaemond_enable="YES"
#courier_imap_imapd_enable="YES"
#courier_imap_pop3d_enable="YES"
#courier_imap_pop3d_ssl_enable="YES"       # pop3 over ssl, port 995
#courier_imap_imapd_ssl_enable="YES"       # imap over ssl, port 993

#firewall_enable="YES"
#firewall_script="/usr/local/etc/ipfw-rules.sh"      # rules definition file for ipfilter
#firewall_logging="YES"

#clamav_freshclam_enable="YES"
#clamav_clamd_enable="YES"

dovecot_enable="YES"
 
now i don't have postfix installed with dovecot; i have exim; but i found that postfix user here;

Code:
j0# dovecot -n
# 1.2.16: /etc/dovecot.conf
# OS: FreeBSD 7.3-RELEASE-p2 i386  ufs
protocols: imap imaps pop3 pop3s
ssl_key_file: /etc/ssl/private/dovecot.key
ssl_cipher_list: HIGH:MEDIUM:+TLSv1:!SSLv2:+SSLv3
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
login_user: dovenull
login_greeting: Dovecot DA ready.
login_processes_count: 16
verbose_proctitle: yes
first_valid_uid: 1016
last_valid_uid: 1016
mail_access_groups: mail
mail_location: maildir:/usr/local/virtual/%d/%n
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_plugins(default): quota imap_quota
mail_plugins(imap): quota imap_quota
mail_plugins(pop3): quota
mail_plugin_dir(default): /usr/lib/dovecot/imap
mail_plugin_dir(imap): /usr/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
lda:
  postmaster_address: [email protected]
auth default:
  mechanisms: plain login
  username_chars: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@&
  verbose: yes
  debug: yes
  passdb:
    driver: sql
    args: /etc/dovecot-sql.conf
  userdb:
    driver: sql
    args: /etc/dovecot-sql.conf
  socket:
    type: listen
    client:
      path: /var/spool/postfix/private/auth
      mode: 432
      user: postfix
      group: postfix
j0#

and when i restart the dovecot i get:

Code:
j0# service dovecot restart
Stopping dovecot: kill: 7104: No such process
                [ FAILED ]
Starting dovecot: Last died with error (see error log for more information): Auth process died too early - shutting down
                [ OK ]

any help???
 
Did you install dovecot with custombuild? Are you using /etc/dovecot.conf provided by directadmin?
 
yes, and here is my config dovecot;

Code:
j0# dovecot -n
# 1.2.16: /etc/dovecot.conf
# OS: FreeBSD 7.3-RELEASE-p2 i386
protocols: imap pop3
ssl_key_password: SSLPASSWORD!
ssl_cipher_list: ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
login_user: dovenull
login_greeting: Dovecot DA ready.
login_processes_count: 16
verbose_proctitle: yes
mail_access_groups: mail
mail_location: maildir:~/Maildir
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_plugin_dir(default): /usr/lib/dovecot/imap
mail_plugin_dir(imap): /usr/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
auth default:
  username_chars: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@&
  verbose: yes
  passdb:
    driver: passwd
  passdb:
    driver: passwd-file
    args: username_format=%n /etc/virtual/%d/passwd
  userdb:
    driver: passwd
  userdb:
    driver: passwd-file
    args: username_format=%n /etc/virtual/%d/passwd

and dovecot restarting fine; but when i try to login through ThunderBird it's show in the maillog file the following error;

Code:
Jan 11 17:27:48 j0 dovecot[12024]: Dovecot v1.2.16 starting up
Jan 11 17:31:17 j0 dovecot[12024]: imap-login: Aborted login (no auth attempts): rip=myipaddress, lip=8serveripaddress
Jan 11 17:31:17 j0 dovecot[12024]: imap-login: Aborted login (no auth attempts): rip=myipaddress, lip=8serveripaddress
Jan 11 17:31:18 j0 dovecot[12024]: pop3-login: Aborted login (no auth attempts): rip=myipaddress, lip=8serveripaddress
Jan 11 17:31:18 j0 dovecot[12024]: pop3-login: Aborted login (no auth attempts): rip=myipaddress, lip=8serveripaddress
Jan 11 17:31:18 j0 dovecot[12024]: imap-login: Aborted login (no auth attempts): rip=myipaddress, lip=8serveripaddress
Jan 11 17:31:18 j0 dovecot[12024]: pop3-login: Disconnected (no auth attempts): rip=myipaddress, lip=8serveripaddress
Jan 11 17:31:18 j0 dovecot[12024]: imap-login: Aborted login (no auth attempts): rip=myipaddress, lip=8serveripaddress
 
Okay, Sounds good... now i can loggin to my email through roundcube, but still have some errors in the mainlog when i sign in or send any emails or recieve any emails through [email protected] email as below;

Code:
j0# tail -F /var/log/maillog
Jan 11 17:55:17 j0 dovecot[12024]: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Jan 11 17:55:17 j0 dovecot[12024]: IMAP([email protected]): Disconnected: Logged out bytes=25/355
Jan 11 17:55:18 j0 dovecot[12024]: auth(default): passwd([email protected],127.0.0.1): unknown user
Jan 11 17:55:18 j0 dovecot[12024]: auth(default): passwd([email protected],127.0.0.1): unknown user
Jan 11 17:55:18 j0 dovecot[12024]: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Jan 11 17:55:18 j0 dovecot[12024]: auth(default): passwd([email protected],127.0.0.1): unknown user
Jan 11 17:55:18 j0 dovecot[12024]: auth(default): passwd([email protected],127.0.0.1): unknown user
Jan 11 17:55:18 j0 dovecot[12024]: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Jan 11 17:55:18 j0 dovecot[12024]: IMAP([email protected]): Disconnected: Logged out bytes=71/752
Jan 11 17:55:18 j0 dovecot[12024]: IMAP([email protected]): Disconnected: Logged out bytes=314/1264
Jan 11 17:55:28 j0 dovecot[12024]: auth(default): passwd([email protected],127.0.0.1): unknown user
Jan 11 17:55:28 j0 dovecot[12024]: auth(default): passwd([email protected],127.0.0.1): unknown user
Jan 11 17:55:28 j0 dovecot[12024]: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Jan 11 17:55:28 j0 dovecot[12024]: IMAP([email protected]): Disconnected: Logged out bytes=373/1408
Jan 11 17:55:29 j0 dovecot[12024]: auth(default): passwd([email protected],127.0.0.1): unknown user
Jan 11 17:55:29 j0 dovecot[12024]: auth(default): passwd([email protected],127.0.0.1): unknown user
Jan 11 17:55:29 j0 dovecot[12024]: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Jan 11 17:55:29 j0 dovecot[12024]: IMAP([email protected]): Disconnected: Logged out bytes=71/719
Jan 11 17:55:32 j0 dovecot[12024]: auth(default): passwd([email protected],127.0.0.1): unknown user
Jan 11 17:55:32 j0 dovecot[12024]: auth(default): passwd([email protected],127.0.0.1): unknown user
Jan 11 17:55:32 j0 dovecot[12024]: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Jan 11 17:55:32 j0 dovecot[12024]: IMAP([email protected]): Disconnected: Logged out bytes=112/433
Jan 11 17:55:33 j0 dovecot[12024]: auth(default): passwd([email protected],127.0.0.1): unknown user
Jan 11 17:55:33 j0 dovecot[12024]: auth(default): passwd([email protected],127.0.0.1): unknown user
Jan 11 17:55:33 j0 dovecot[12024]: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Jan 11 17:55:33 j0 dovecot[12024]: IMAP([email protected]): Disconnected: Logged out bytes=378/1423
Jan 11 17:55:54 j0 dovecot[12024]: auth(default): passwd([email protected],127.0.0.1): unknown user
Jan 11 17:55:54 j0 dovecot[12024]: auth(default): passwd([email protected],127.0.0.1): unknown user
Jan 11 17:55:54 j0 dovecot[12024]: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Jan 11 17:55:56 j0 dovecot[12024]: IMAP([email protected]): Disconnected: Logged out bytes=716/819
Jan 11 17:55:56 j0 dovecot[12024]: auth(default): passwd([email protected],127.0.0.1): unknown user
Jan 11 17:55:56 j0 dovecot[12024]: auth(default): passwd([email protected],127.0.0.1): unknown user
Jan 11 17:55:56 j0 dovecot[12024]: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Jan 11 17:55:56 j0 dovecot[12024]: IMAP([email protected]): Disconnected: Logged out bytes=25/383
Jan 11 17:55:56 j0 dovecot[12024]: auth(default): passwd([email protected],127.0.0.1): unknown user
Jan 11 17:55:56 j0 dovecot[12024]: auth(default): passwd([email protected],127.0.0.1): unknown user
Jan 11 17:55:56 j0 dovecot[12024]: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Jan 11 17:55:56 j0 dovecot[12024]: IMAP([email protected]): Disconnected: Logged out bytes=314/1246
Jan 11 17:55:57 j0 dovecot[12024]: auth(default): passwd([email protected],127.0.0.1): unknown user
Jan 11 17:55:57 j0 dovecot[12024]: auth(default): passwd([email protected],127.0.0.1): unknown user
Jan 11 17:55:57 j0 dovecot[12024]: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Jan 11 17:55:57 j0 dovecot[12024]: IMAP([email protected]): Disconnected: Logged out bytes=122/1151

Sorry to keep updating this thread; as my posting here to make any other guys googling or searching for a same Issue to be solved as i'am trying here.

any update/tips from users here would be helpfull please post!
 
Back
Top