bar top left
bar top right
left curve
right curve
Welcome, Guest

Script to configure Gmail as relayhost in postfix
(1 viewing) (1) Guest
Go to bottom
Post Reply
Post New Topic
Page: 1
TOPIC: Script to configure Gmail as relayhost in postfix
*
#38103
Script to configure Gmail as relayhost in postfix 2 Years, 3 Months ago Karma: 104
With this script you can configure Gmail using sasl auth as relayhost for postfix, to deliver all your emails.
If you run it as it is, it starts asking the user for the gmail credentials and some data needed to customize the SSL certificate, but it can also be easily made fully unattended, assigning values to the variables and removing the first lines (starting with read).

Code:


wget http://www.lolacolay.com/ramon/postfixgmail.sh
chmod +x postfixgmail.sh
./postfixgmail.sh

Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
ramoncio
Gold Boarder
Posts: 1674
graphgraph
User Offline Click here to see the profile of this user
Reply Quote
 
#49164
Re:Script to configure Gmail as relayhost in postfix 1 Year, 10 Months ago Karma: 0
That was peace of cace to set up even for complete NOB like i am, thanks a lot
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
Acidizer
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Gender: Male lncomputers Location: Israel Birthday: 10/18
Reply Quote
 
#53418
Re:Script to configure Gmail as relayhost in postfix 1 Year, 8 Months ago Karma: 8
+1 to you for that, will this work for different types of email accounts that require authentication, I am thinking once I set up a user and new password I can modify the script to create the certs for their email host instead, it is not gmail.
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
rollinsolo
Senior Boarder
Posts: 279
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: Tampa, FL
Reply Quote
 
#53930
Re:Script to configure Gmail as relayhost in postfix 1 Year, 8 Months ago Karma: 0
This worked Awesome!

Thanks
Bob
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
bhallottawa
Fresh Boarder
Posts: 14
graphgraph
User Offline Click here to see the profile of this user
Reply Quote
 
#53991
Re:Script to configure Gmail as relayhost in postfix 1 Year, 8 Months ago Karma: 8
Ramoncio the only thing I would change in the script is who sends the email in vm_general.inc in /etc/asterisk, if you change serveremail, who the email appears to come from which would be the email used to authenticate mail this script works for any email server out there, well gmail and an exchange server hosted in the Amazon Cloud, the only other file I had to change was /etc/postfix/generic and take out anything before the first @ sign so the line looks similar to @pbx.local username@gmail.com
then do a postmap /etc/postfix/generic and restart postfix or reboot server and email will go through authenticating to just about anyone.
Thanks for this could not have done it for a customer of mine without this.
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
rollinsolo
Senior Boarder
Posts: 279
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: Tampa, FL
Reply Quote
 
#54008
Re:Script to configure Gmail as relayhost in postfix 1 Year, 8 Months ago Karma: 8
I also see you lost your Karma somehow well heres one more for this.
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
rollinsolo
Senior Boarder
Posts: 279
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: Tampa, FL
Reply Quote
 
#54015
Re:Script to configure Gmail as relayhost in postfix 1 Year, 8 Months ago Karma: 104
Thanks for that!!

Someone took my karma away, I see...
I'll have to start over
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
ramoncio
Gold Boarder
Posts: 1674
graphgraph
User Offline Click here to see the profile of this user
Reply Quote
 
#54050
Re:Script to configure Gmail as relayhost in postfix 1 Year, 8 Months ago Karma: 8
If they can fix it I think you were at least 60+ I left you one for the script and then noticed your were at 0 again, kinda sucks FIX IT GUYS he earned each and every one of those. Side note Ramoncio do you know how to make UUCP send mail as root my voicemail to email goes thru authenticated using your script but faxes are being sent from=<uucp@pbx.local> as opposed to from=<asterisk@pbx.local> and are being rejected because the sender does not have permission to send as this sender, I am trying to tread lightly because its a customer production server, also hard to replicate on my own because they use their own mail client and mine is working both ways using Gmail. Thanks.
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
rollinsolo
Senior Boarder
Posts: 279
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: Tampa, FL
Reply Quote
 
#58835
Re:Script to configure Gmail as relayhost in postfix 1 Year, 5 Months ago Karma: 0
Fantastic Script. I spent half a day trying to get email working before I found your script. It took 5 minutes once I got your script.

Thanks again
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
rnrover
Fresh Boarder
Posts: 44
graphgraph
User Offline Click here to see the profile of this user
Reply Quote
 
#83692
Re: Re:Script to configure Gmail as relayhost in postfix 5 Months, 3 Weeks ago Karma: 0
Excelent ... very good script..thk.
Enter code here   
Please note: although no board code and smiley buttons are shown, they are still usable.
mambo
Nuevo en Elastix.... necesito ayuda...
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: Santo Domingo Birthday: 01/26
saludos,
M@mbo
eolivodos@hotmail.com
Sto Dgo, Rep. Dom.
Reply Quote
 
Go to top
Post Reply
Post New Topic
Page: 1
Moderators: Bob, jgutierrez