User Tools

Site Tools


linux:web-mail-system

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

linux:web-mail-system [2016/05/18 04:19] – [Fix roundcube error] adminlinux:web-mail-system [2022/10/29 16:15] (current) – external edit 127.0.0.1
Line 239: Line 239:
 /onec/postfix/sbin/postmap -q cuuthien2.com mysql:/onec/postfix/conf/sql/mysql_virtual_alias_maps.cf /onec/postfix/sbin/postmap -q cuuthien2.com mysql:/onec/postfix/conf/sql/mysql_virtual_alias_maps.cf
 </code> </code>
 +
 +Fix error: <code>
 +connect to mysql server 127.0.0.1: access denied for user 'postfix'@'localhost'
 +</code>
 +=> After we check the connect to MySQL server with account postfix/xxxxx OK but postfix can't connect to MySQL Server. Fix: You can re-create all sql files in **sql/*.cf** of postfix for current version of postfix
 ==== Debug Postfix with postconf ==== ==== Debug Postfix with postconf ====
   * Show modules which was compiled with postfix:<code bash>   * Show modules which was compiled with postfix:<code bash>
Line 633: Line 638:
 ==== Config Integrate with postfix ==== ==== Config Integrate with postfix ====
 Default Config:<code php> Default Config:<code php>
-$config['smtp_server'] = '';+$config['smtp_server'] = '127.0.0.1';//You must change to IP local to fix error can't send email with roundcube
 $config['smtp_port'] = 25; $config['smtp_port'] = 25;
 $config['smtp_user'] = ''; $config['smtp_user'] = '';
Line 654: Line 659:
 header('Location: /?_task=mail'); header('Location: /?_task=mail');
 </code> </code>
 +===== Config Mail Server Security and Mail Exchange =====
 +==== Config Mail Server Security ====
 +Config postfix limit IP for connecting to postfix SMTP Server by edit **main.cf**:<code>
 +mynetworks = 127.0.0.0/8,10.20.50.69/32,10.20.50.69/32,10.20.50.71/32,123.31.47.39/32
 +</code>
 +==== Config Mail Exchange for new domain ====
 +Add new MX record for new domain and point it to SMTP Server
 ===== Merge Email ===== ===== Merge Email =====
 Below are steps form merge mail server from database postfix1 to database postfix2: Below are steps form merge mail server from database postfix1 to database postfix2:
Line 661: Line 673:
 mysqldump  -hlocalhost -uroot -p --add-drop-table --quote-names --opt --routines --extended-insert=FALSE --complete-insert --add-locks --quick --compress postfix > postfix.sql mysqldump  -hlocalhost -uroot -p --add-drop-table --quote-names --opt --routines --extended-insert=FALSE --complete-insert --add-locks --quick --compress postfix > postfix.sql
 </code> </code>
-  - Backup mail box: <code bash>+  - Backup mail config data: <code bash> 
 +cat postfix.sql | grep "INSERT INTO \`domain\`" > domain.sql 
 +cat postfix.sql | grep "INSERT INTO \`alias\`" > alias.sql
 cat postfix.sql | grep "INSERT INTO \`mailbox\`" > mailbox.sql cat postfix.sql | grep "INSERT INTO \`mailbox\`" > mailbox.sql
 +</code>
 +  - Remove line Insert All from domain.sql<code>
 +INSERT INTO `domain` (`domain`, `description`, `aliases`, `mailboxes`, `maxquota`, `quota`, `transport`, `backupmx`, `created`, `modified`, `active`) VALUES ('ALL','',0,0,0,0,'',0,'0000-00-00 00:00:00','0000-00-00 00:00:00',1);
 </code> </code>
 ===== Email Spam ===== ===== Email Spam =====
Line 676: Line 693:
 Ref: PBL1544985 Ref: PBL1544985
 123.31.0.0/16 is listed on the Policy Block List (PBL) 123.31.0.0/16 is listed on the Policy Block List (PBL)
-</code>+</code> => Fix follow link: https://www.spamhaus.org/pbl/removal/
       * 123.31.47.39 is not listed in the SBL       * 123.31.47.39 is not listed in the SBL
       * 123.31.47.39 is not listed in the XBL       * 123.31.47.39 is not listed in the XBL
Line 683: Line 700:
 May 17 18:50:54 vdo postfix/qmgr[28464]: 8658699A03D: from=<info@cuuthien2.com>, size=984, nrcpt=1 (queue active) May 17 18:50:54 vdo postfix/qmgr[28464]: 8658699A03D: from=<info@cuuthien2.com>, size=984, nrcpt=1 (queue active)
 to=<onec.tamtt@gmail.com> </code> => The IP you're using to send mail is not authorized to 550-5.7.1 send email directly to our servers. Please use the SMTP relay at your 550-5.7.1 service provider instead. Learn more at 550 5.7.1  https://support.google.com/mail/answer/10336. => Fix: Verify your ownership of cuuthien2.com on https://postmaster.google.com/managedomains with txt Record<code> to=<onec.tamtt@gmail.com> </code> => The IP you're using to send mail is not authorized to 550-5.7.1 send email directly to our servers. Please use the SMTP relay at your 550-5.7.1 service provider instead. Learn more at 550 5.7.1  https://support.google.com/mail/answer/10336. => Fix: Verify your ownership of cuuthien2.com on https://postmaster.google.com/managedomains with txt Record<code>
-v=spf1 google-site-verification=C8Cr473YwyVOub-Algia91pZsT2xAJ5msqUjEo3HVOo a mx  ~all +v=spf1 a mx  ~all 
-</code>+</code>And point MX to SMTP Server
 ==== Fix Email sent to google were marked spam ==== ==== Fix Email sent to google were marked spam ====
 View email sent from anhvc@tolava.com with header below((To see this, simply send email to a Gmail account, and then select ‘See Original’ in the little menu at the top of the email message. You get to see all the headers for the email.)):<code> View email sent from anhvc@tolava.com with header below((To see this, simply send email to a Gmail account, and then select ‘See Original’ in the little menu at the top of the email message. You get to see all the headers for the email.)):<code>
linux/web-mail-system.1463545191.txt.gz · Last modified: 2022/10/29 16:15 (external edit)