Enabling Redmine for Receiving Mails

Today i struggled around getting Redmine pulling Mails from a remote IMAP server and creating issues with its content. Finally i’v get it working… There are several rules you should keep in mind:

  • Be carful if you have defined any mandatory additional fields for your Issues
  • If you set unknown_user=create be sure the newly created user has access to the project automatically. If he has no access, the issue will not be created
  • If you just want to pipe Mails into a Redmine project use unknown_user=accept and o_permission_check=1 and issues are getting created with the anonymous User. Works well for a simple “one-way” posting

Finally i’ve created a small bash script to run the import process all 5 minutes:

SERVER=host.domain.tld
USER=jbauer
PASS=ILike24
 
rake -f /path/to/your/Redmine/installation/Rakefile redmine:email:receive_imap RAILS_ENV="production" \
host="$SERVER" \
username="$USER" \
password="$PASS" \
move_on_success=read \
project=sandbox \
allow_override=project,tracker,category,priority,status \
unknown_user=accept \
no_permission_check=1 \
status=New \
tracker=Bug \
priority=Low
exit $?

For mor detailed information visit the Redmine Wiki.

Tagged: , , , , ,

Connect to MSSQL Server with PHP on Linux (FreeTDS)

It may be possible, that you need to connect your PHP Script to a MSSQL Datasource. Every good web-hoster should have installed some libraries to connect to MSSQL. Usually there will be the FreeTDS Library installed.
There are two steps to be done:

1. Create a connection specific freetds.conf configuration file in the location where your other PHP files are:

[mssqlserver]
	host = 1.2.3.4
	port = 1433
	tds version = 8.0 // MSSQL 2008
	#tds version = 4.2 // older MSSQL Servers

2. You can use this connection information from your PHP script:

// Older FreeTDS installations need the FREETDSCONF Environment variable
putenv('FREETDSCONF=/path/to/freetds.conf');
// Current release of FreeTDS uses the FREETDS environment variable. So we set both to be sure
putenv('FREETDS=/path/to/freetds.conf');
$mssql = mssql_connect('mssqlserver' , 'user', 'password');
mssql_select_db('myDb',$mssql);
Tagged: , , ,

Redmine and GMail SMTP Server

It’s kind of tricky to configure redmine to send mails over GMail to project participants. The following configurations works very well for sourceTube.net. Tested with the actual Redmine Version 1.1.2 and ActionMailer 2.3.5.

Be careful editing the file. Do not use tabs, just spaces!

Just put the following in config/email.yml

production:
  delivery_method: :smtp
  smtp_settings:
    tls: true
    address: "smtp.gmail.com"
    port: 587
    domain: "domain.tld"
    authentication: :plain
    user_name: "MyEmailAddress@domain.tld"
    password: "ThisIs$ecret"
    enable_starttls_auto: true
Tagged: , , , ,

Erster Post mit BlogIt

Dies ist der erste Post mit der neuen iPhone App BlogIt!

Bad UIImagePickerController

It took me more than 2 hours to fix this “Memory warning” issue with the UIImagePickerController. My Application worked very well in the simulator. On the Phone i got this Memory warning every time i took a picture with the camera. The picker returned an UIImage = nil. This is my code:

-(void)viewDidLoad 
{
     self.imgPicker = [[UIImagePickerController alloc] init]; 
     self.imgPicker.allowsImageEditing = YES;
     self.imgPicker.delegate = self; 
     self.imgPicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
}
 
-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info 
{
     dispimage = [[info objectForKey:UIImagePickerControllerOriginalImage]retain];
     [picker dismissModalViewControllerAnimated:YES]; 
}
 
-(IBAction)open
{
    if(self.imgPicker == nil)
    { 
         self.imgPicker = [[UIImagePickerController alloc] init]; 
         self.imgPicker.allowsImageEditing = YES;
         self.imgPicker.delegate = self; 
         self.imgPicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
    }
    [self presentModalViewController:self.imagePicker animated:YES]; 
    [self.imagePicker release]; 
}
 
-(IBAction) print
{ 
      if(dispimage != nil)
      {
            imageView.image=dispimage; 
      }
};

And the solution? I’ve just to closed all open applications, which where a lot! It seems to me it is also a memory leak bug in current 4.0.x releases. Hopefully it will be fixed with the next iOS release.

So long, i’m going to bed now.

Tagged: , , , , ,

WordPress Plugin: WP to twitter

Wouldn’t it be nice to let your blog tweet new posts? The plugin WP to Twitter does exactly this! Once installed you need to connect the plugin to Twitter. Due to the change of Twitter’s Auth system to OAuth it isn’t as easy as it was. But the necessary steps are well documented within the plugin. Just follow the steps exactly. After connecting the plugin to Twitter, new posts and sites are tweeted.

Tagged:

Central Network Management with Rancid

To proceed with this Howto you need rancid configured and running. Read the Post about Rancid.

If you are working in a Network with more than just two or three devices and you do not to work on them every day it can be a pain to connect to one of them. First you need the IP or Hostname, then get the password. Normally you need two passwords, to connect and get into the privileged mode. And finally you should know which kind of device you are connecting to determine if you should use telnet or ssh.

With rancid and a short and simple shell script i’ve solved this problem perfectly!

Tagged: , , , , ,

Free some space on OSX

I’ve got about 56 GB more free HD space on my Mac OSX. All i’ve done is just disabling the option of keeping copies of my mails locally for offline viewing. Damn, i have more than 50GB mail data? Oukay, thats a different topic… Especially if you’ve done an search in your mailbox every mails gets downloaded from the server. Due to i’m working with an IMAP Account i really do not need offline copies.

Tagged: , ,

WordPress Plugin: BackWPup – WordPress Backup

I’d like to show you today one of my favorite WordPress Plugins: BackWPup.

The Plugin allows you to create Backups of your whole WordPress installation. And with whole, i mean whole! You can back up all database tables, files and any additional folders and files. It is also possible to exclude any folders or files in a easy way.

The backups are created automatically with the wp_cron() function.

Tagged: ,

Binding a DHCP Server to an Interface in Debian

If you want to have your ISC-DHCP Server listening to just one specific interface in Debian you just need to edit the File “/etc/default/isc-dhcp-server” and add the appropriate interfaces to the INTERFACES variable.

Thats it.

Tagged: , ,
Page 3 of 1112345...10...Last »