Local development environment for osTicket - email

I am developing custom features for osTicket and I need to setup a mail system that sends emails, locally, and can simulate several email inboxes.
My local development setup is vagrant with ubuntu precise 64. I already have the LAMP stack running.
osTicket needs to send emails (only internally) and needs to have mailboxes (osticket reads and processes incoming mail on selected mailboxes).
I installed postfix, but could not get it to work.
Thank You.

Recently, I installed osTicket for my company. It can allow you to setup SMTP, which can use your Gmail account to send email. It is simple to setup.
The only thing to keep in mind is you need to use "Allow less secure apps to access your account". See: https://support.google.com/accounts/answer/6010255?hl=en for more information.
Configure ssl://smtp.gmail.com as your SMTP address and port 465 as your SMTP port. Even if you are not using Gmail, you still have to put "ssl://" before your SMTP host name.

Related

Local email to root should not leave the host

I am trying to set up the most simple email server on an Amazon Linux 2 host for simple outbound mail (e.g. sending system messages). Following instructions on the net, I have installed mailx and sendmail. I am not committed to either package, I just want a simple setup with a minimal footprint. I have no problem switching to postfix if that is a better solution.
For configuration I have made the following changes.
/etc/sysconfig/sendmail:
DAEMON=no
/etc/mail/submit.cf (hostname obfuscated):
D{MTAHost}smtp.******.com
This works fine, and I am able to receive mail that is sent from the system.
There is a wrinkle. The anacron process is sending mail to the root account. However, rather than the mail being kept internal to the system it is being sent to the SMTP server. The SMTP server sends the message back to my host, which doesn't accept mail, and a loop is created when an 'undeliverable' message is send back to root on the host that doesn't accept mail.
How can I configure my system so email to root stays local and is not sent to the SMTP server? Any other 'best practices' suggestions would be welcome as well. And again, if switching to postfix is better, I am willing to do so (but will need configuration guidance).

Can I send email to friends (say to gmail) from my local computer (IIS or Apache), if yes how?

I am planning to send email to my friends (they are in gmail and hotmail) from my local PC which I use at my home (in dynamic IP). Is it ever possible to configure IIS or Apache in my local PC and connect to home broadband and can send email?
I do not want to take any help from any other hosting company (as generally we do by using .Net or Php by taking SMTP address) so if need I can try to configure some website name to my PC (if possible).
I do not need to get any reply from them they will send again to my gmail address.
Is it ever possible as my plan?
This question may be of some help to you: How to send email from local machine to gmail?
You should be able to run a .NET, PHP or other local web service on your home machine and use one of the libraries included in the link above to send e-mails without requiring a 3rd party web host. Out of curiosity, what are you trying to accomplish exactly? There may be a simpler solution within gmail's API.
What you want is to build a SMTP Server!
Things you will need
STATIC IP.
Reverse DNS from your ip to you hostname (type nslookup yourip on cmd.exe the result must be your hostname)
DNS MX entry on your DNS ZONE like 0 your.host.name.com
A program/code that will implement the RFC2821 http://www.ietf.org/rfc/rfc2821.txt
I have build a SMTP server that ONLY receive emails... maybe you can start from there....
https://stackoverflow.com/questions/24834765/how-receive-emails-in-net-listening-connection-from-gmail-yahooo-not-a-pop

Debian isn't capable of sending emails anymore

My VM-Ware VM running Debian 6 doesn't send emails since I moved to another house with another modem/router. I did a complete reinstall of Debian, but still I can't send email. My network adapter is set to 'Bridged' (with 'Replicate physical network connection state' enabled).
I installed an application that needs to send an email to work properly. But I can't finish it because I don't receive an email at all.
date | mail test#example.com on the command-line also doesn't work, so it hasn't something to do with the application.
Do I need to configure my router in order to send external emails from my VM?
I managed to solve the mailing-problems!
I needed to do two things:
Setting up a SMTP-server for Postfix because my ISP doesn't allow usage of port 25 without using their SMTP-server. See this reference for a how-to.
Then I needed to configure a 'send-from adress', because by default emails are sent from a localhost email adress. The SMTP-server doesn't recognizes this as valid and prevents the email from being sent. See this reference for a how-to.
It cost me almost a few days to solve it, but now I can receive outgoing emails from my Debian system :).

Sending an email from my virtual box

I do web development from my ubuntu server, ubuntu is running in virtualbox in my windows 7. What do I need to configure inside of ubuntu in order to send email to any public domain, gmail.com for example? I need this set up for testing email templates etc... Thanks, Jaro.
For testing email on the ubuntu machine, the best way is to create a local account and use email like account#localhost.
It is not a good test otherwise if you want to send mail directly from your system, as many ISPs are not allowing SMTP traffic over broadband DSL, e.g. my provider THREE in UK doesnt allow it, as well many big email companies will reject emails coming from broadband subnets.
Another way would be deploying the mail server, which is complex, also you can test your app at any free hosting provider too.
Basically testing email is nothing close to being simple and to test it properly, you need a production system with mail fully setup and working, whitelisted, not on DSL and so on.

How do I send mail from my ruby on rails application?

How do i send mail on my ubuntu system. I need to send mail in my ruby on rails application but can't test, because mail isn't being sent. What do i need to do on my system. (now testing this app is making me realize why mail wasn't being sent through that Evolution thing i have installed)
The Evolution thing is an MUA (Mail User Agent) like Outlook, Thunderbird, or any number of programs intended for user to read and create email messages. Your program is also a limited MUA (likely creation only).
You need to send your e-mail to an MTA (Mail Transfer Agent). If you configure the return address correctly, you may be able to use the same MTA that you connect to with Evolution. In this case the SMTP server used to send email. If you are using one of the e-mail libraries you should be able to specify the SMTP server name as well as a user-id and password if required.
Many packages require an MTA so you may have Postfix, Exim4, or Sendmail already installed. Check for programs listening on port 25. If so you can use localhost as your SMTP server. If you need to send email other systems you may need to configure your MTA as a satellite to your ISPs server which will relay your message out to the Internet.