postfix-mta

SASL LOGIN authentication failed: Invalid authentication mechanism on Rails using Postfix and Dovecot on Ubuntu 12.10 [closed]

大城市里の小女人 提交于 2019-12-04 15:02:08
I have configured an ubuntu 12.10 server with Postfix and Dovecot. Nonetheless, I have SASL Login authentication problem when I try to send emails using a rails web application. Using RoundCube Webmail, I get this log when I send an email: Feb 21 21:09:01 ks400054 postfix/qmgr[17883]: 61D4E113: removed Feb 21 21:16:34 ks400054 postfix/smtpd[19157]: connect from ks400054.kimsufi.com[37.59.38.218] Feb 21 21:16:34 ks400054 postfix/smtpd[19157]: 9FA8419: client=ks400054.kimsufi.com[37.59.38.218], sasl_method=CRAM-MD5, sasl_username=noreply@stagingcrio.info Feb 21 21:16:34 ks400054 postfix/cleanup

Python : Postfix stdin

怎甘沉沦 提交于 2019-12-04 04:21:59
I want to make postfix send all emails to a python script that will scan the emails. However, how do I pipe the output from postfix to python ? What is the stdin for Python ? Can you give a code example ? Michael Berkowski To push mail from postfix to a python script, add a line like this to your postfix alias file: # send to emailname@example.com emailname: "|/path/to/script.py" The python email.FeedParser module can construct an object representing a MIME email message from stdin, by doing something like this: # Read from STDIN into array of lines. email_input = sys.stdin.readlines() # email

send email from swift osx application

拜拜、爱过 提交于 2019-12-03 12:41:40
I am facing problem on sending mail from my osx swift application. To send mail i used the below code import Foundation import Cocoa class sendemail : NSObject, NSSharingServiceDelegate{ func sendEmail() throws { print("enter email sending") let body = "This is an email for auto testing throug code." let shareItems = [body] as NSArray let service = NSSharingService(named: NSSharingServiceNameComposeEmail) service?.delegate = self service?.recipients = ["abc@dom.com"] let subject = "Vea Software" service?.subject = subject service?.performWithItems(shareItems as [AnyObject]) } } i have found

Is it possible to send mails by bash script via smtp?

送分小仙女□ 提交于 2019-12-03 11:54:11
I have postfix+dovecot. I want to make bash script which can use SMTP for this. I don't want use sendmail. Is it possible? May be someone has some examples of code? Boy, when that gauntlet is thrown, it always bash es me right upside the head! :-) #!/bin/sh function checkStatus { expect=250 if [ $# -eq 3 ] ; then expect="${3}" fi if [ $1 -ne $expect ] ; then echo "Error: ${2}" exit fi } MyHost=`hostname` read -p "Enter your mail host: " MailHost MailPort=25 read -p "From: " FromAddr read -p "To: " ToAddr read -p "Subject: " Subject read -p "Message: " Message exec 3<>/dev/tcp/${MailHost}/$

how to change default email address for postfix? [closed]

戏子无情 提交于 2019-12-03 04:58:08
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I have a server running python, php, perl, ruby, and I have couple applications which also send mail. I was wondering in case if one of the applications don't specify a from email address, the sender email address is set to http@example.com and the sender name was "http". I was able change the sender name by

how to change default email address for postfix? [closed]

北慕城南 提交于 2019-12-02 19:22:17
I have a server running python, php, perl, ruby, and I have couple applications which also send mail. I was wondering in case if one of the applications don't specify a from email address, the sender email address is set to http@example.com and the sender name was "http". I was able change the sender name by going into /etc/passwd and changing the name to what I wanted, but how do I change http@example.com to admin@example.com ? knittl You can use the smtp_generic_maps of postfix to rewrite email headers for outgoing smtp mail: user:~$ echo "http@example.com admin@example.com" >> /etc/postfix

Defining a “messagle handler” in Postfix

时光总嘲笑我的痴心妄想 提交于 2019-12-02 08:33:15
We are using Postfix for mail delivery and I am trying to make a shell script handle an email sent to foo-bar-baz-bat@example.org. Is there a way to do this and how? I am trying to create an email-based front-end for a bulletin board. The users have split into two factions: those who would like to use the forum and those who prefer using mailing list. The idea is to create a solution that would please both groups by sending an email notification about the new post (this is the easy part) and also allowing people to post via email, where the metadata (such as topic id) would be encoded in the

Postfix: Send email to PHP

本秂侑毒 提交于 2019-12-02 01:49:30
问题 Greetings, Anyone know of a good way to send an email to my postfix server which then opens a PHP script to process this email? I could do cron, but I'd prefer to do it instantly... Any pointers greatly appreciated. Many thanks in advance, 回答1: You may be able to use a .forward, but probably the easiest way is to configure procmail. Edit: here's a sample .procmailrc rule that may help: :0 w * ^From.*authorized@example.com | php /path/to/script.php If the email comes from authorized@example

Postfix: Send email to PHP

泄露秘密 提交于 2019-12-02 00:20:56
Greetings, Anyone know of a good way to send an email to my postfix server which then opens a PHP script to process this email? I could do cron, but I'd prefer to do it instantly... Any pointers greatly appreciated. Many thanks in advance, You may be able to use a .forward, but probably the easiest way is to configure procmail. Edit: here's a sample .procmailrc rule that may help: :0 w * ^From.*authorized@example.com | php /path/to/script.php If the email comes from authorized@example.com, then it will get passed to the php script. Since this is done from procmail which can be integrated with

Quoting/Escaping variables in mail body

孤人 提交于 2019-12-01 16:06:11
I am feeling a bit awkward, because I am generating a mail-body with PHP without escaping the variables. In HTML I am using htmlspecialchars() or similar functions, for command lines escapeshellarg(), but for mails? For example something like this: <?php $usercontent = $_GET['usercontent']; mail("dummy@nowhere.tld", "My Subject", "My body with $usercontent included"); ?> What could a possible attacker do with a script like the one above and how could I protect against such an attack? Or is PHP mail() save and why? Update Please refer to the example: Only the body is affected (No Headers!)