Mail system maintenance

xiaoxiao2021-03-06  36

Mail system maintenance:

Mail system related log

/ var / log / maillog / var / log / qmail / current / var / log / qmail / pop3d / current / var / log / qmail / pop3ds / current / var / log / qmail / smtpd / current / var / spool / qmailscan /qmail-queue.log/var/spool/qmailscan/qms-events.log/var/spool/qmailscan/quarantine.log

Set the capacity of QMAIL user mailbox # CD / home / vpopmail / bin #. / Vsetuserqutoa domain.com 10500000s - Domain.com This domain is set to 10M #. / Vsetuserqutoa Xuki@domain.com 10500000s --- only Xuki@domain.com This user is set separately to 10m.

Batch add users

example 1:

Create a new file BATCHADDUSER.SH, copy the following to the file, run the CHMOD U X BATCHADDUSER.SH, make it executable.

#! / bin / bash #batchadduser.sh: Batch add mail user. #install step. #Chmod u x batchadduser #. / batchadduser.sh domain datafile if [$ # -lt 2] Then Echo "Usage: $ 0 domain datafile "EXIT 1 fi domain = $ 1 datafile = $ 2 addcmd = / home / vpopmail / bin / vadduser while read username passwd do $ addcmd $ usrname @ $ domain $ passwd Done <$ datafile

User file content format username1 passwd username2 passwd2 .........

Run BATCHADDUSER.SH User to add users to batch.

Example 2:

I put the user name in a text file, a name, password, and its account, and the user will change your password.

While Read Line Do Echo $ Line ./vadduser $ LINE $ LINE DONE

There is a choice to clean up MAIL Queue 1, handle the mail in the queue:

If you want to pass the email in the queue, you can # kill -hup qmail-send to delete the mail in the queue 1) Stop qmail 2) mv / var / qmail /; Find / Var / qmail /; / queue / -type f -exec rm {} /;; mv / var / qmail / lock / var / qmail / queue / 3) Restart QMAIL. The mail in the queue is included in the following directory / var / qmail / queue / { Info, Mess, Remote, Local} / has / # number 2, quickly delete mail from one place but does not exist in the mail queue. Bad.jite.com is this domain. You can type the following command # echo #> ~ alias / .qmail-baddomain-default # echo bad.jite.com :Alaias-baddomain >> / var / qmail / control / virtualdomains # echo bad.jite.com:127.0.0.1> > / var / qmail / control / smtproutes and run / var / qmail / bin / qmail-tcpok, give qmail-send a HUP signal 3, delete a large number of advertisements in the queue first stop QMail. 1) Stop QMail, qmail-smtpd 2) In the following default directory / var / qmail / queue / mess find / var / qmail / queue / message -type f -exec grep "^ Subject: DSS" {} /; -Print -exec rm {} /; 3 ) Run Queue-fix clear correlation file, 4) Restart QMAIL.

Use the SH backup qmail mysql data to the specified FTP address method back up vpopmail's Domains directory, Qmail's Control Directory and MySQL's VAR data storage directory, use crontab timing. Below is a script file, the specific directory is your own system change: mkdir / var / qmailbakup CD / var / qmailbakup touch qmailbakup.sh chmod 755 qmailbakup .sh Vi qmailbakup.sh [code: 1: D48055598] #! / Bin / sh Date = `DATE % Y-% M-% D-% h` CD / VAR / QMailbakup / Tar CVZF Domains. $ DATE.TAR.GZ / Home / Vpopmail / Domains Tar Cvzf Control. $ DATE.TAR.GZ / VAR / QMAIL / Control Tar CVZF Mysql. $ DATE.TAR.GZ / USR / local / mysql / var ftp -n 192.168.0.21 <

Solution to Sina, QMail Echo "My Mail Server's real domain (A record)"> / var / qmail / control / helohost temporarily restricts a user's POP3 VMODUSER -P email_addr or domain (for the entire domain)

Modify the default domain name A: To change haohao.com as the default domain. Method: Change ~ QMail / Control / DefaultDomain Me PlusDomain Changes to start POP3 and SMTP startup scripts: modification: email.3sk.com is haohaoo.com Add: Export vpopmail_domain = haohaoo.com

Complete the QMAIL user of a system to another system A: a.cdb configuration? So please back the / home / vpopmail / domains. Users and password files, and user letters are in this directory. You should also back up the relevant profiles under / var / qmail / control.

b. If you are using a MySQL database to store user authentication information, you only need to back up all email / var / qmail / control of all mail / var / qmail / control under VPopMail / Domain. Usually / var / lib / mysql (rpm), / usr / local / mysql / data, / usr / local / mysql / var.

Change the name of a mail domain such as a.com to B.COM, how to implement the following steps: 1, CD / Home / Vpopmail / Domains MV A.com B.COM 2, export all VPopmail tables of the VPOPMAIL database A.COM is changed to B.COM, then delete the vpopmail table, then import. 3, change the A.com of the VPOPMAIL database to B.COM 4, in / home / qmail / control directory to put Virtualdomains and Rcpthosts The next A.com is changed to B.COM. 5. Change the ASSIGN file A.com to B.COM 6 under the / home / qmail / user / usrs directory, you need to run the qmail-newu to regenerate CDB. Assign is just a configuration file, and the CDB is the actual data file. Accelerate QMAIL Email Mail A: / VAR / QMAIL / Control The following is the QMail control file, these two files: ConcurrentcyLocal Default: 10 largest local simultaneous transfer number Concurrencyremote default: 20 Maximum remote simultaneous transmission number change domain default management account a : VModuser has a -a parameter that gives user management privileges.

If you want to completely disable the special rights of Postmaster, you can only change the source.

Qmail's main profile (/ var / qmail / control directory): File name default value user purpose BadmailFrom None qmail-smtpd blacklist address BounceFrom mailer-daemon qmail-send return message Bouncehost me qmail-send returned mail ConcurrencyLocal 10 QMail-send local simultaneous delivery Mail number ConcURRENCYREMOTE 20 QMail-send At the same time to the number of remote hosts DEFAULTDOMAIN me qmail-inject Default Domain name DefaultHost Me qmail-inject Default host name Databasetes 0 qmail-smtpd mail maximum capacity (0 = unlimited ) doublebouncehost me qmail-send doublebounceto postmaster qmail-send envnoathost me qmail-send not override the default domain name helohost me qmail-remote host name idhost me qmail-inject Message-ID host name localiphost me qmail-smtpd local IP of the "@" in name locals me qmail-send transmitted to the local domain name me domain name system officially various morercpthosts none qmail-smtpd second rcpthosts percenthack none qmail-send using the "%" format of the domain name plusdomain me qmail-inject qmqpservers none qmail-qmqpc QMQP server IP address queuelifetime time 604800 qmail-send stored in the queue the message (s) rcpthosts none qmail-smtpd received mail domain smtpgreeting me qmail-smtpd smtproutes none qmail-remote timeoutconnect 60 qmail-remote SMTP connection time timeoutremote 1200 qmail-remote Waiting for the remote host time Timeoutsmtpd 1200 Qmail-SMTPD SMTP Customer Connection Time VirtualDomains None qmail-send Virtual Domain Name Qmail Limit Accessories Size My Configuration Experience == "Qmail Limit Accessories Size: 1. Sets At / VAR / QMAIL / Control / Databasetes Settings Settings Size, this Document should be created manually, enter the number directly, the default unit is bytes, such as 10485760 is 10m; 2. Webmail Send attachment by default, only 500K, if you want to support 5m accessories, modify the following file # vi /etc/php.ini

Post_max_filesize = 5m // 320 row UPLOAD_MAX_FILESIZE = 5m // 405 line session.bug_compat_42 = 0 // Add to 641 line session.bug_compat_warn = 0

# vi /etc/httpd/conf.d/php.conf limitRequestBody 5242880 // Modify 14 rows of values ​​to 5m

Webmail upload attachment size restrictions (resolving issues that cannot be greater than 512KB) change /etc/httpd/conf.d/php.conf:

524288 in LimitRequestBody 524288 just equal to 512KB, change it to 10485760, and set an accessory that allows maximum upload to 10MB.

转载请注明原文地址:https://www.9cbs.com/read-71649.html

New Post(0)