PDA

View Full Version : automail.pl is missing


bhoward
01-16-2010, 01:28 PM
**EDIT #2: Thanks to whoever fixed the thread title for me!**

Hello. =)

I'm trying to setup email piping, and my webhost (Lunarpages) said I have to do it "manually"...which involves using a file called automail.pl (not automail.php).

The thing is, I don't have this file. It never came in my osTicket installation pack. =\

Can someone help? Thanks in advance!

Corey
01-16-2010, 01:42 PM
When you download osTicket there are two folders called "upload" and "scripts". The file automail.pl is located in the "scripts" folder.

bhoward
01-16-2010, 07:50 PM
Ah, thanks! I see it now...but ONLY in the file I downloaded from osticket.com

For some reason, the version included in Fantastico doesn't have it. :confused: There's no "scripts" folder on my website at all...

Should I copy/upload the actual "scripts" folder to my web server too? Or just follow the email piping (http://osticket.com/wiki/Email_Piping) instructions, which doesn't mention uploading the folder?

Kelli
01-16-2010, 08:12 PM
The fantastico installation for osTicket kind of sucks for a number of reasons...

You only need automail.php/pl for remote piping. For local piping, you don't need it.

If you're trying to set up remote piping, you can basically put automail.php anywhere you want to, so long as you can forward mail to it.

bhoward
01-17-2010, 04:18 AM
I'm not really familiar with any of those terms; I'm still a beginner when it comes to web servers and hosting. =\

I'm assuming that remote piping means "on another server", like if I tried using my GMail account for osTicket? And local means whatever is on my current server (which would be CPanel and SquirrelMail)?

But I think for my web server, I have to use piping. Here's what Lunarpages said in their Knowledge Base:

Taken from LunarPages (my webhost's) Knowledge Base:
The piping setup must be installed manually. Go to the Control Panel > Mail > Email Filtering > Add Filter. Choose "From" and "Equal to" and enter the email address that was set up in the "Category" menu in osTicket's Admin interface. Enter "|/home/username/public_html/path/automail.pl" without quotes in the destination field. Of course, it'll need to be adjusted to use your full path to the automail.pl script which is in the osTicket installation directory.

Next, go to the Control Panel > File Manager and locate the automail.pl script. Make sure its permission is 755 and edit it (editing Perl scripts from the control panel is done correctly, so it's possible to do this fully from the control panel). Next locate the following lines,

#configuration
%config = (mailprog => '/usr/lib/sendmail',
database_host => 'localhost',
database_name => 'dbname',
database_user => 'dbuser',
database_pass => 'dbpass');

Adjust the settings with the database user and database name that was given during installation in Fantastico. (To get the database password, locate config.php in the installation directory. It can be located under the database name and user in that file.)

By the way, what's the difference (including pros and cons) between email piping and email fetching? Maybe I should fetch the mail instead? Would that be easier? (And would I still have a copy of all osTicket transactions in my inbox?)

Kelli
01-17-2010, 03:55 PM
That's kind of a weird setup. They seem to be really over-complicating things. All you should have to do with piping is make an email address that's an alias which points to pipe.php, or automail.php/pl.

Furthermore, the automail scripts don't even connect to the database.

I think their instructions may be from a very old version of osTicket. Fantastico had 1.3 in it forever (until about June) so if Lunarpages hasn't updated their FAQ since then.....

Try this:

First, find your path to your pipe.php file.

Second, find your path to PHP (usually '/usr/bin/php' but not always, still, worth trying, since it's most likely correct)

Then, go to cPanel, click Mail, click Forwarders, click Add Forwarder

enter:

'support' for the username (no quotes) and select the appropriate domain from the drop down menu if you have more than one domain hosted on your account.

Then enter:

|/usr/bin/php -q /home/yourusername/public_html/osticket/api/pipe.php

Replacing the paths in bold with the actual paths for your particular setup.

That should be all you have to do. :)

With email piping, you're creating an alias that then forwards incoming emails to the script for processing.

With polling, you're telling the script to connect to the mail server and fetch the messages from a real mailbox.

The big advantage to piping is that it's real-time, you just set up the one forwarder, and that's it. Piping hands off some of the work to the mail server, instead of relying on PHP/osTicket to do it all, so it's faster and a little more efficient. Polling needs a cron job to manually run it every 5 minutes or so, so it's not as 'real time' and you could end up processing a lot of emails all at once, if you get a large amount of email traffic.

Then there's auto-cron instead of setting up a real cron job, which is kind of a last resort, really.

bhoward
01-17-2010, 07:56 PM
Hi again Kelli. =)

EDIT (again): I had written a loooong message here, but I fixed everything and it worked! I had to replace the api/pipe.php file. Apparently, the one Fantastico had was corrupted...but the one I just downloaded from osTicket.com works fine. (It's a shame how screwed up Fantastico [and Lunarpages] are.)

Anyway, after I replaced the file, I just added the forwarded to all of my other accounts (clerical@mysite.com, billing@mysite.com, etc.) and now it works great! There's just one minor problem though:

Is there a way to delete this part of the piped messages? -- [ see image here (http://sky.geocities.jp/bri_sama18/docs/piped-message_small-problem.jpg) ]