diff --git a/configure b/configure
index 9bbff7677c4db5585def6d427ec70f7309e40491..a6ebe003db4af1760cd632f4721d9c17a7adc83f 100755
--- a/configure
+++ b/configure
@@ -34584,7 +34584,7 @@ fi
     fi
 fi
 
-for ver in 2.0 2.2 2.4 2.6; do
+for ver in 2.0 2.2 2.4 2.6 3.0; do
 
    if test "x${PBX_GMIME}" != "x1" -a "${USE_GMIME}" != "no"; then
 
diff --git a/configure.ac b/configure.ac
index 32b5fc09b274b937bc5fba3b470163817d67bf3d..ccd6936dde5e5a982c19cdc056d9efd3c124c644 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2558,7 +2558,7 @@ then
     fi
 fi
 
-for ver in 2.0 2.2 2.4 2.6; do
+for ver in 2.0 2.2 2.4 2.6 3.0; do
 	AST_PKG_CONFIG_CHECK([GMIME], gmime-$ver)
 	if test "$PBX_GMIME" = 1; then
 		break;
diff --git a/res/res_http_post.c b/res/res_http_post.c
index 3f0a58e36b85be5e6aee4d5ab016507e16271315..9f5b1837a27921d02cace2feda95e84d37fdcfad 100644
--- a/res/res_http_post.c
+++ b/res/res_http_post.c
@@ -55,6 +55,9 @@
 #ifdef GMIME_TYPE_CONTENT_TYPE
 #define AST_GMIME_VER_24
 #endif
+#if GMIME_MAJOR_VERSION >= 3
+#define AST_GMIME_VER_30
+#endif
 
 /* just a little structure to hold callback info for gmime */
 struct mime_cbinfo {
@@ -84,7 +87,11 @@ static void post_raw(GMimePart *part, const char *post_dir, const char *fn)
 
 	stream = g_mime_stream_fs_new(fd);
 
+#ifdef AST_GMIME_VER_30
+	content = g_mime_part_get_content(part);
+#else
 	content = g_mime_part_get_content_object(part);
+#endif
 	g_mime_data_wrapper_write_to_stream(content, stream);
 	g_mime_stream_flush(stream);
 
@@ -107,7 +114,11 @@ static GMimeMessage *parse_message(FILE *f)
 	
 	g_object_unref(stream);
 
-	message = g_mime_parser_construct_message(parser);
+	message = g_mime_parser_construct_message(parser
+#ifdef AST_GMIME_VER_30
+			, NULL
+#endif
+	);
 
 	g_object_unref(parser);
 
@@ -486,7 +497,11 @@ static int reload(void)
 
 static int load_module(void)
 {
-	g_mime_init(0);
+	g_mime_init(
+#ifndef AST_GMIME_VER_30
+			0
+#endif
+	);
 
 	__ast_http_post_load(0);