Postingan

Menampilkan postingan dengan label Postfix

Configure Postfix to use Gmail as a Mail Relay on Fedora

Summary: #dnf update && dnf install postfix cyrus-sasl cyrus-sasl-plain mailx #vi /etc/postfix/sasl_passwd [smtp.gmail.com]:587    username@gmail.com:password #chmod 600 /etc/postfix/sasl_passwd #vi /etc/postfix/main.cf Add or modify the following values: relayhost = [smtp.gmail.com]:587 smtp_use_tls = yes smtp_sasl_auth_enable = yes smtp_sasl_security_options = smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_tls_CAfile = /etc/ssl/certs/ca-bundle.crt #postmap /etc/postfix/sasl_passwd #systemctl restart postfix.service https://myaccount.google.com/lesssecureapps #mail -s "Subject Here" recipient@domain.com < textfile or #telnet localhost 25 mail from: rcpt to:  data your_messages . quit Troubleshooting: journalctl -u postfix

Increasing Attachment Size in Posfix

Postfix by default restrict attachment size to approx 10MB i.e. 10240000 bytes. You can check it using following command: postconf | grep message_size_limit To change attachment-size to say 50 MB, run a command like: postconf -e message_size_limit=52428800 https://easyengine.io/tutorials/mail/postfix-attachment-size/

How to configure mailbox limit Postfix

Gambar
Work task: Limit mailbox for each user to 1MB How to configure: Limit size in bytes Find & edit /etc/postfix/main.cf as follow:    mailbox_size_limit = 1024000    message_size_limit = 1024000 ~#etc/init.d/postfix restart How to mark: #postconf mailbox_size_limit #postconf massage_size_limit Output: mailbox_size_limit = 1024000 message_size_limit = 1024000 Additional Proof: Screencast berikut test postfix message mailbox size using mail client CLI mutt

Konfigurasi mail client Mutt

Mutt adalah mail client dengan tampilan CLI #apt-get install mutt Login user, buatlah file konfigurasi baru untuk mutt di ~/.muttrc dengan script berikut: set realname = "Nasohi Ciptandani" set from = "nasohi@skill39.id" set use_from = yes set envelope_from = yes set smtp_url = "smtp://nasohi@skill39.id@smtp.skill39.id:25/" set smtp_pass = "p4ssw0rd" Simpan file konfigurasi diatas Berikut mencoba mengirim email melalui command line #mutt -s "Test from mutt" unyil@skill39.id < /tmp/message.txt

Cara Konfigurasi SMTP Authentication Postfix Menggunakan LDAP (Dovecot + libnss-ldap)

Gambar
Untuk membuat SMTP Authentication pada Postfix, diperlukan komponen SASL seperti Cyrus-SASL atau Dovecot-SASL . Hal ini dijelaskan dalam dokumentasi resmi Postfix: http://www.postfix.org/SASL_README.html Salah satu kebutuhan yang sering muncul adalah: “Authentication has to be done through LDAP.” Artinya proses autentikasi SMTP harus menggunakan user yang tersimpan di LDAP server. Metode SMTP Authentication dengan LDAP Ada beberapa cara untuk mengimplementasikan autentikasi LDAP pada Postfix, di antaranya: SMTP Authentication menggunakan Cyrus-SASL (paket: cyrus-sasl , sasl2-bin , libsasl2-modules-ldap ) SMTP Authentication menggunakan Dovecot + dovecot-ldap SMTP Authentication menggunakan Courier SMTP Authentication menggunakan Dovecot + libnss-ldap ✅ (metode yang dibahas di artikel ini) Konsep Metode Dovecot + libnss-ldap Secara default, Dovecot menggunakan system users untuk autentikasi. Oleh karena itu, kita dapat memanfaatkan libnss-ldap agar user ...