On Wed, Mar 18, 2015 at 05:19:32AM -0500, Peng Yu wrote: > I just need to send emails via gmail through command line. Configuring > postfix for this seems to overkill.
I am assuming that when you say "via Gmail" you really mean it. In other words Gmail (port 587 submission) will be asked to relay the mail to a third party. Naturally they will want to authenticate the sending client, and generally enforce the equivalent of the Postifx reject_sender_login_mismatch feature (possibly allowing some specially provisioned client credentials to send as multiple sender addresses). > Does anybody know a simplest solution to send emails via gmail on command > line (no receiving emails needed)? This is NOT a question about Postfix. Postfix can act as a submission client with either sender-specific or sender-domain specific credentials. Rather the real answer should be sought from the Gmail administrators, but since they're too busy to answer questions in person, inferred from their online documentation. I strongly advise against attempting to track the passwords of multiple users on the server, and the server and all its users live under one roof, and perhaps not even then. Again this is NOT a Postfix issue. This is a Gmail account provisioning issue. -- Viktor.