#sasl_passwd
Explore tagged Tumblr posts
guangyaw · 4 years ago
Text
在 Ubuntu 透過 postfix 寄信
在 Ubuntu 透過 postfix 寄信
 Postfix 是一種電子郵件伺服器 在 Ubuntu 可以用來寄信或轉信, 今天就來教大家 在 Ubuntu 透過 postfix 寄信 首先安裝套件sudo apt install postfix mailutils打開設定檔加入 relayhost = smtp.gmail.com:587 smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = noanonymous smtp_tls_security_level = encrypt smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt 修改或新增密碼設定檔sudo vi…
Tumblr media
View On WordPress
0 notes
rodrigocarran · 5 years ago
Text
Configurando o Postfix como retransmissão de email para o Office 365
Configurando o Postfix como retransmissão de email para o Office 365
Tumblr media
Instalar sasld
yum install cyrus-sasl cyrus-sasl-plain cyrus-sasl-md5 systemctl start saslauthd
na pasta /etc/postfix crie o arquivo sasl_passwd e coloque o nome de usuário e a senha da caixa de correio que serão usados ​​como retransmissão
[smtp.office365.com]:587 [email protected]:Pass
Para definir “from” padrão como este email, abra o arquivo /etc/postfix/generic
Adicione isso na parte inferior…
View On WordPress
0 notes
maironmendes · 6 years ago
Text
main.cf
## TLS Settings # # For no logs set = 0 smtp_tls_loglevel = 1 # # smtp_enforce_tls = yes # Above is commented because doing it site by site below smtp_tls_per_site = hash:/etc/postfix/tls_per_site # ##smtp_tls_CAfile = /etc/postfix/certs/CAcert.pem smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt smtp_tls_cert_file = /etc/postfix/certs/mycert.pem smtp_tls_key_file = /etc/postfix/certs/mykey.pem smtp_tls_session_cache_database = btree:/var/run/smtp_tls_session_cache smtp_use_tls = yes # smtpd_tls_CAfile = /etc/postfix/certs/CAcert.pem smtpd_tls_CAfile = /etc/ssl/certs/ca-certificates.crt smtpd_tls_cert_file = /etc/postfix/certs/mycert.pem smtpd_tls_key_file = /etc/postfix/certs/mykey.pem smtpd_tls_received_header = yes smtpd_tls_session_cache_database = btree:/var/run/smtpd_tls_session_cache smtpd_use_tls = yes tls_random_source = dev:/dev/urandom
##  SASL Settings # This is going in to THIS server smtpd_sasl_auth_enable = no # We need this smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtpd_sasl_local_domain = $myhostname smtp_sasl_security_options = noanonymous #smtp_sasl_security_options = smtp_sasl_tls_security_options = noanonymous # smtpd_sasl_application_name = smtpd
## Gmail Relay relayhost = [smtp.gmail.com]:587
## Good for Testing # sender_bcc_maps = hash:/etc/postfix/bcc_table
# Disable DNS Lookups disable_dns_lookups = yes # # Great New feature Address Mapping #  for example may mchirico@localhost to [email protected] smtp_generic_maps = hash:/etc/postfix/generic
# # transport_maps = hash:/etc/postfix/transport
compatibility_level=2
0 notes
casualmiraclepost-blog · 8 years ago
Text
有标题真好,我试试可以发多长的文章
postfix就是打算替代sendmail的,sendmail删了吧。
yum remove -y sendmail
安装postfix及支持
yum install -y postfix mailx cyrus-sasl-plain
把发邮件的邮箱的账号密码替换后执行。
echo "[smtp.gmail.com]:587 [email protected]:xxxxxxxxx" > /etc/postfix/sasl_passwd
生成sasl_passwd.db
postmap hash:/etc/postfix/sasl_passwd
修改证书年限
cd /etc/ssl/certs/
vi Makefile
#把365改36500,有效期一百年,嘿嘿之后可以按需求改回来。
制作证书及ssl密钥,并移动
make server.pem
mv server.pem /etc/postfix/
修改postfix配置文件 /etc/postfix/main.cf ,清空替换成如下。
relayhost = [smtp.gmail.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/postfix/server.pem
smtp_use_tls = yes
重启postfix
/bin/systemctl restart postfix.service
配置完成
可以通过下面命令查看postfix活动日志,排错就靠它了。
tail -f /var/log/maillog
发送测试邮件xxxx为收信地址
echo | mail -s 'is is a test l' [email protected]
如果成功那就是成功啦。
参考文章
http://www.jslink.org/linux/centos-postfix-mailx-qq-smtp-sendmail.html
https://easyengine.io/tutorials/linux/ubuntu-postfix-gmail-smtp/
0 notes
tierrapl-hackme · 8 years ago
Text
Postfix - transferring emails through Gmail
Install postfix
$ sudo apt-get install postfix
Add the following to /etc/postfix/main.cnf
# Forward mail through Gmail relayhost = [smtp.gmail.com]:587 smtp_use_tls = yes smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = noanonymous smtp_tls_CAfile = /etc/ssl/certs/Equifax_Secure_CA.pem
Create the file /etc/postfix/sasl_passwd and add the following:
[smtp.gmail.com]:587 @gmail.com:
Be sure to replace and with your account user name and password.
Modify file permissions and generate sasl_passwd.db
$ cd /etc/postfix $ postmap sasl_passwd $ chmod 600 sasl_passwd sasl_passwd.db
Restart postfix service
$ sudo service postfix restart
Send a test email
$ sudo apt-get install mailutils $ echo 'Success!' | mailx -s 'Test Message'
0 notes
daengkhao · 8 years ago
Text
Sysadmin diaries - Day 3
Another quiet day at work but back home I decided to tackle some of the odd messages I’d noticed at boot after I updated the kernel the other day.
First on list, I noticed that my ufw firewall was blocking some traffic from my Netgear NAS. For a while I’d had a problem with the NFS mount locking up after a while. This seemed to coincide with a firmware upgrade on the NAS. Naturally I was cursing Netgear. However, I noticed that on my laptop I didn’t get that issue. Must be some silly bleedin default in Linux Mint I concluded, So I started to dabble with the NFS mount options, without success so far. But here was the answer, the firewall was blocking some kind of keep alive messages from the NAS. A quick firewall update:
ufw allow from 192.168.11.9
and problem fixed. Apologies Netgear and Linux Mint, user error again, it broke when I set up the firewall.
Next were the following messages:
Jan  5 11:36:54 localhost postfix/smtp[29391]: 75858A424AC: SASL authentication failed; server smtp.gmail.com[64.233.184.109] said: 534-5.7.9 Appl ication-specific password required. Learn more at?534 5.7.9  https://support.google.com/mail/?p=InvalidSecondFactor f67sm99639626wmd.13 - gsmtp
The gmail SMTP server was rejecting my mail. Come to think of it, I hadn’t had any emails from the server in a while, in fact since I turned on Google 2 factor authentication. After a bit of research I found out that you need to create an app password. To do this you need to go to https://security.google.com/settings/security/apppasswords , select app > Mail , select device > Other (Custom Name) > create a name > Generate. My server runs postfix so i had to add the application specific password to sasl_passwd replacing the one already there and ran
/etc/postfix/sasl_passwd
A restart of postfix and another problem solved.
Next /boot as a bit full after the kernel update. So I deleted the files relating to the oldest kernel and ran
update-grub
This updates grub with kernels available and /boot was down to 50% utilised.
Finally, after updating to Linux Mint 18 a few months back I was expecting the boot time to drop dramatically due to the synchronous start up performed by systemd. However, it still seemed a bit slow but I found this really useful command:
systemd-analyze blame
If you run systemd, try it. It lists the time it takes to start each service with the slowest at the top. For example, I found puppetserver was taking over 3 minutes to start. As I installed it just as a learning exercise, I decided to disable it. I also disabled a couple of other unnecessary slow starters.
That’s it for today, bye!
0 notes